/* ===========================================
   HELP DESK TICKET SYSTEM - ORGANIZED CSS
   =========================================== */

/* ===========================================
   CSS CUSTOM PROPERTIES (THEME SYSTEM)
   =========================================== */

:root {
    /* Dark Theme (Default) */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333333;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #333333;
    --border-hover: #444444;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --input-bg: #333333;
    --modal-bg: #2a2a2a;
    --card-bg: #2a2a2a;
    --accent-color: #007acc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --info-color: #17a2b8;
}

/* Light Theme */
body.theme-light {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f4;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --border-hover: #ced4da;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --input-bg: #ffffff;
    --modal-bg: #ffffff;
    --card-bg: #ffffff;
    --accent-color: #0066cc;
}

/* ===========================================
   BASE STYLES
   =========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* ===========================================
   HEADER STYLES
   =========================================== */

.main-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-badge {
    background: rgba(0, 102, 204, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 102, 204, 0.3);
    font-weight: 500;
}

.login-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.logout-btn {
    background: var(--error-color) !important;
    border-color: var(--error-color) !important;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===========================================
   BUTTON STYLES
   =========================================== */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: 1px solid transparent;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-hover);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* ===========================================
   CONTAINER AND LAYOUT
   =========================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #0099ff);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.header h1 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ===========================================
   CONTROLS AND FILTERS
   =========================================== */

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

.filter-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 5px;
    white-space: nowrap;
}

.filter-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--border-hover);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.filter-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
    margin: 0 10px;
}

.add-ticket-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.add-ticket-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

/* ===========================================
   STATISTICS CARDS
   =========================================== */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 5px;
    text-transform: uppercase;
}

/* ===========================================
   KANBAN BOARD
   =========================================== */

.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.column {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.column:hover {
    border-color: var(--border-hover);
}

.column.drag-over {
    border-color: var(--accent-color);
    background: rgba(0, 102, 204, 0.1);
    box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.3);
    transform: scale(1.02);
}

.column.drag-over::before {
    content: "Drop here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 102, 204, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
}
.column.disabled {
    opacity: 0.5;
    pointer-events: none;
}
.ticket[draggable="false"] {
    cursor: not-allowed !important;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.column-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-count {
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-indicator.draft { background: #6c757d; }
.status-indicator.submitted { background: #ffa500; }
.status-indicator.in-progress { background: var(--accent-color); }
.status-indicator.done { background: var(--success-color); }

/* ===========================================
   TICKET STYLES
   =========================================== */

.tickets-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    cursor: grab;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.ticket:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
    border-color: var(--border-hover);
}

.ticket.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(0.95);
    cursor: grabbing;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: none;
}

.ticket.clickable-ticket {
    cursor: pointer;
}

.ticket-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text-primary);
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ticket-meta span {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.category {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.department {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.initiator {
    color: var(--text-secondary);
    font-size: 11px;
}

.assignee {
    color: var(--accent-color);
    font-size: 11px;
}

/* Priority Styles */
.priority {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.priority.low { 
    background: var(--success-color); 
    color: white; 
}

.priority.medium { 
    background: var(--warning-color); 
    color: #212529; 
}

.priority.high { 
    background: #fd7e14; 
    color: white; 
}

.priority.critical { 
    background: var(--error-color);
    color: white; 
    animation: pulse 2s infinite;
}

.ticket.priority-critical {
    border-left-color: var(--error-color);
}

.ticket.priority-high {
    border-left-color: #fd7e14;
}

.ticket.priority-medium {
    border-left-color: var(--warning-color);
}

.ticket.priority-low {
    border-left-color: var(--success-color);
}

/* SLA Styles */
.sla-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.sla-badge.sla-breached {
    background: var(--error-color);
    color: white;
    animation: pulse 1s infinite;
}

.sla-badge.sla-warning {
    background: var(--warning-color);
    color: #212529;
}

.sla-badge.sla-on-track {
    background: var(--success-color);
    color: white;
}

.ticket.sla-breach {
    animation: slaPulse 3s infinite;
    border-left-color: #ff6b6b !important;
    border-left-width: 5px !important;
}

/* ===========================================
   ASSIGNEE MANAGEMENT STYLES
   =========================================== */

.assignees-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.assignees-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.assignees-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.assignees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.assignee-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.assignee-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    border-color: var(--accent-color);
}

.assignee-info {
    flex: 1;
    margin-right: 1rem;
}

.assignee-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.assignee-email {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
    font-family: 'Courier New', monospace;
    background: rgba(0, 102, 204, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.assignee-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
}

.assignee-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ===========================================
   ANALYTICS AND CHARTS
   =========================================== */

.analytics-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.charts-section {
    margin-top: 50px;
    padding: 30px 0;
}

.charts-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.charts-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.charts-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.chart-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #0099ff, #00bfff);
    border-radius: 16px 16px 0 0;
}

.chart-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px var(--shadow-hover);
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chart-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    min-height: 350px;
}

.chart-wrapper {
    position: relative;
    height: 280px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-wrapper canvas {
    max-height: 100%;
    max-width: 100%;
    width: 100% !important;
    height: 100% !important;
}

.chart-insights {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--accent-color);
    margin-top: 15px;
}

.chart-insights p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    color: var(--text-muted);
    font-style: italic;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-hover);
    border-color: var(--accent-color);
}

.metric-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* ===========================================
   MODAL STYLES
   =========================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--modal-bg);
    margin: 3% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--modal-bg);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    color: var(--text-secondary);
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--modal-bg);
    border-radius: 0 0 12px 12px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--modal-bg);
    border-radius: 0 0 12px 12px;
}

/* ===========================================
   FORM STYLES
   =========================================== */

.enhanced-form {
    max-width: 100%;
    margin: 0;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    animation: slideIn 0.3s ease-out;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: var(--bg-secondary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.form-group small {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.category-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.category-option:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.category-option.active {
    border-color: var(--accent-color);
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.category-option.active::before {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.category-icon {
    font-size: 36px;
    margin-right: 20px;
    flex-shrink: 0;
}

.category-content {
    flex-grow: 1;
}

.category-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.category-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Priority Grid */
.priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.priority-option {
    padding: 20px 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--bg-tertiary);
}

.priority-option:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.priority-option.active {
    border-color: var(--accent-color);
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

.priority-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.priority-badge.critical {
    background: #dc3545;
    color: white;
}

.priority-badge.high {
    background: #fd7e14;
    color: white;
}

.priority-badge.medium {
    background: #ffc107;
    color: #212529;
}

.priority-badge.low {
    background: #28a745;
    color: white;
}

.priority-sla {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-size: 16px;
}

.priority-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===========================================
   THEME TOGGLE BUTTON
   =========================================== */

.theme-toggle-btn {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    background: rgba(0, 102, 204, 0.9) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.8rem 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 10000 !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3) !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4) !important;
    background: rgba(0, 86, 179, 0.9) !important;
}

.theme-toggle-btn .theme-icon {
    font-size: 1.2rem !important;
}

.theme-toggle-btn .theme-text {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

/* ===========================================
   TAB SYSTEM
   =========================================== */

.tab-container {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: var(--bg-tertiary);
}

.tab-content {
    min-height: 300px;
}

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.toast {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 4px 12px var(--shadow-color);
    transform: translateX(100%);
    animation: slideIn 0.3s ease forwards;
    border: 1px solid var(--border-color);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.info {
    border-left-color: var(--info-color);
}

/* ===========================================
   LOADING SPINNER
   =========================================== */

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* ===========================================
   ANIMATIONS
   =========================================== */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes slaPulse {
    0% { box-shadow: 0 0 5px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.7); }
    100% { box-shadow: 0 0 5px rgba(255, 107, 107, 0.3); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 1200px) {
    .board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-left {
        text-align: center;
    }
    
    .user-info-header {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filter-divider {
        display: none;
    }
    
    .add-ticket-btn {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .board {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .column {
        padding: 15px;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .priority-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .assignee-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .assignee-info {
        margin-right: 0;
    }
    
    .assignee-actions {
        width: 100%;
        justify-content: center;
    }
    
    .assignees-grid {
        grid-template-columns: 1fr;
    }
    
    .assignees-header {
        flex-direction: column;
        text-align: center;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle-btn {
        bottom: 1rem !important;
        right: 1rem !important;
        padding: 0.6rem 1rem !important;
    }
    
    .theme-toggle-btn .theme-text {
        display: none !important;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .priority-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .ticket {
        padding: 12px;
    }
    
    .ticket-title {
        font-size: 13px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .category-option {
        flex-direction: column;
        text-align: center;
    }
    
    .category-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .assignee-name {
        font-size: 1rem;
    }
    
    .assignee-email {
        font-size: 0.8rem;
    }
    
    .assignee-role {
        font-size: 0.75rem;
    }
}

/* ===========================================
   ACCESSIBILITY
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus,
input:focus,
select:focus,
textarea:focus,
.ticket:focus,
.filter-btn:focus,
.btn:focus,
.tab-btn:focus,
.close-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
    .theme-toggle-btn,
    .controls,
    .modal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ticket {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        background: white !important;
    }
}

.admin-notice {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 153, 255, 0.05));
    border: 2px solid rgba(0, 102, 204, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.notice-icon {
    font-size: 3rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.notice-content h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.notice-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.notice-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* ===========================================
   ADMIN-SPECIFIC ENHANCEMENTS
   =========================================== */

/* Admin Action Panel */
.admin-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

/* Admin Mode Indicator */
.admin-mode {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

/* Enhanced Filter Groups */
.filter-group {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
}

.maritime-filter {
    position: relative;
}

.maritime-filter[data-maritime="maritime"].active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.maritime-filter[data-maritime="standard"].active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Admin Header Enhancements */
.header-subtitle {
    font-style: italic;
    opacity: 0.8;
}

/* Enhanced Controls Layout */
.controls {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Responsive Admin Layout */
@media (max-width: 1024px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        justify-content: center;
    }
    
    .admin-actions {
        margin-left: 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .action-group {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-mode {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    .action-label {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* ===========================================
   ENHANCED DRAG & DROP STYLES
   =========================================== */

.drop-zone-active {
    border: 2px dashed var(--accent-color) !important;
    background: rgba(0, 122, 204, 0.05) !important;
    transition: all 0.3s ease !important;
}

.column.drag-over {
    border-color: var(--accent-color) !important;
    background: rgba(0, 122, 204, 0.1) !important;
    box-shadow: inset 0 0 0 2px rgba(0, 122, 204, 0.3) !important;
    transform: scale(1.02) !important;
    transition: all 0.2s ease !important;
}

.column.drag-over::before {
    content: "Drop here to update status";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 122, 204, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ticket.dragging {
    opacity: 0.5 !important;
    transform: rotate(5deg) scale(0.95) !important;
    cursor: grabbing !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
    transition: none !important;
    border: 2px solid var(--accent-color) !important;
}

.ticket[draggable="true"] {
    cursor: grab;
    position: relative;
    transition: all 0.2s ease;
}

.ticket[draggable="true"]:hover {
    cursor: grab;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.ticket[draggable="true"]:active {
    cursor: grabbing;
}

.drag-handle {
    position: absolute;
    top: 5px;
    right: 5px;
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    user-select: none;
    pointer-events: none;
}

.ticket:hover .drag-handle {
    opacity: 0.7;
}

/* ===========================================
   MARITIME-SPECIFIC STYLES
   =========================================== */

.maritime-critical {
    border-left: 4px solid #dc3545 !important;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
}

.maritime-urgent {
    border-left: 4px solid #fd7e14 !important;
    background: linear-gradient(135deg, rgba(253, 126, 20, 0.1), rgba(253, 126, 20, 0.05));
}

.maritime-priority {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    text-align: center;
}

.maritime-urgent .maritime-priority {
    background: rgba(253, 126, 20, 0.2);
    color: #fd7e14;
}

.maritime-safety-notice {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(255, 193, 7, 0.05));
    border: 2px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: pulseWarning 3s infinite;
}

.safety-icon {
    font-size: 2rem;
    color: #dc3545;
    flex-shrink: 0;
}

.safety-content {
    flex: 1;
}

.safety-content strong {
    color: #dc3545;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.safety-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.maritime-critical-ticket {
    border-left: 5px solid #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
}

.maritime-alert {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    animation: pulseAlert 2s infinite;
}

/* ===========================================
   FEEDBACK ANIMATIONS
   =========================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
    }
}

@keyframes pulseAlert {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* ===========================================
   DROP FEEDBACK STYLES
   =========================================== */

.drop-feedback {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.3s ease;
    white-space: nowrap;
}

.drop-feedback.success {
    background: #28a745;
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.drop-feedback.error {
    background: #dc3545;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===========================================
   ENHANCED TICKET STATUS BADGES
   =========================================== */

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-draft {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.status-badge.status-submitted {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.status-in-progress {
    background: rgba(0, 122, 204, 0.2);
    color: #007acc;
    border: 1px solid rgba(0, 122, 204, 0.3);
}

.status-badge.status-done {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* ===========================================
   RESPONSIVE ENHANCEMENTS
   =========================================== */

@media (max-width: 768px) {
    .column.drag-over::before {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .maritime-safety-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .safety-icon {
        align-self: center;
    }
    
    .drag-handle {
        display: none;
    }
    
    .ticket[draggable="true"]:hover {
        transform: none;
    }
}

/* ===========================================
   ACCESSIBILITY IMPROVEMENTS
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    .ticket, .column, .drop-feedback {
        animation: none !important;
        transition: none !important;
    }
    
    .column.drag-over {
        transform: none !important;
    }
    
    .ticket.dragging {
        transform: none !important;
    }
}

/* Focus indicators for keyboard navigation */
.ticket:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.column:focus-within {
    border-color: var(--accent-color);
}

        /* Enhanced Portal Selection Styles */
        .portal-selection {
            min-height: calc(100vh - 80px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
        }

/* ===========================================
    SIDE PANEL (User Tickets)
    =========================================== */
.side-panel { position: fixed; top: 0; right: 0; width: 480px; max-width: 95vw; height: 100%; background: var(--bg-secondary); border-left: 1px solid var(--border-color); box-shadow: -4px 0 16px var(--shadow-color); z-index: 10000; display: none; flex-direction: column; }
.side-panel-header { display:flex; justify-content: space-between; align-items:center; padding: 1rem; border-bottom: 1px solid var(--border-color); background: var(--bg-tertiary); }
.side-panel .close-btn { border: none; background: transparent; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }
.side-panel-body { padding: 1rem; overflow: auto; height: 100%; }
.filters-row { display:flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.tickets-list { display: grid; gap: .5rem; }
.ticket-item { border:1px solid var(--border-color); border-radius: 8px; padding:.75rem; background: var(--bg-secondary); }
.ticket-item h4 { margin: 0 0 .25rem 0; color: var(--text-primary); }
.ticket-meta { font-size: .8rem; color: var(--text-secondary); display:flex; gap:.5rem; flex-wrap: wrap; }

        .portal-container {
            max-width: 1200px;
            width: 100%;
            text-align: center;
        }

        .portal-container h2 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            color: #007acc;
        }

        .portal-container > p {
            font-size: 1.2rem;
            color: #ccc;
            margin-bottom: 3rem;
        }

        .portal-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .portal-card {
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .portal-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            border-radius: 15px 15px 0 0;
        }

        .portal-card.shorebase-card::before {
            background: linear-gradient(90deg, #007acc, #0099ff);
        }

        .portal-card.vessel-card::before {
            background: linear-gradient(90deg, #dc3545, #c82333);
        }

        .portal-card.admin-card::before {
            background: linear-gradient(90deg, #28a745, #20c997);
        }

        .portal-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 122, 204, 0.2);
        }

        .portal-card.shorebase-card:hover {
            border-color: #007acc;
            box-shadow: 0 10px 30px rgba(0, 122, 204, 0.3);
        }

        .portal-card.vessel-card:hover {
            border-color: #dc3545;
            box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
        }

        .portal-card.admin-card:hover {
            border-color: #28a745;
            box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
        }

        .portal-icon {
            font-size: 4rem;
            margin-bottom: 1rem;
        }

        .portal-card h3 {
            font-size: 1.8rem;
            margin-bottom: 1rem;
            color: #fff;
        }

        .portal-card p {
            color: #ccc;
            margin-bottom: 1.5rem;
            font-size: 1.1rem;
        }

        .portal-card ul {
            list-style: none;
            padding: 0;
            margin-bottom: 2rem;
            text-align: left;
        }

        .portal-card li {
            color: #ccc;
            margin-bottom: 0.5rem;
            padding-left: 1rem;
        }

        .portal-info {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 2rem;
            max-width: 600px;
            margin: 0 auto 2rem;
        }

        .portal-info h3 {
            margin-bottom: 1rem;
            color: #007acc;
        }

        .user-info-card {
            text-align: left;
        }

        .user-detail {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.8rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .user-label {
            font-weight: 600;
            color: #fff;
        }

        .user-value {
            color: #ccc;
            font-family: 'Courier New', monospace;
        }

        /* Quick Access Section */
        .quick-access-section {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 2rem;
            margin-top: 2rem;
        }

        .quick-access-section h3 {
            margin-bottom: 1.5rem;
            color: #007acc;
        }

        .quick-access-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1rem;
        }

        .quick-access-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .quick-access-item:hover {
            background: rgba(0, 122, 204, 0.1);
            border-color: #007acc;
            transform: translateY(-2px);
        }

        .quick-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .quick-text {
            font-size: 0.9rem;
            color: #ccc;
            font-weight: 500;
        }

        /* Modal Styles */
        .system-status-grid {
            display: grid;
            gap: 1rem;
        }

        .status-item {
            display: flex;
            align-items: center;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .status-icon {
            font-size: 1.5rem;
            margin-right: 1rem;
        }

        .status-icon.online {
            color: #28a745;
        }

        .status-icon.offline {
            color: #dc3545;
        }

        .status-icon.warning {
            color: #ffc107;
        }

        .status-name {
            font-weight: 600;
            color: #fff;
            margin-bottom: 0.25rem;
        }

        .status-detail {
            font-size: 0.9rem;
            color: #ccc;
        }

        .help-section {
            margin-bottom: 2rem;
            text-align: left;
        }

        .help-section h4 {
            color: #007acc;
            margin-bottom: 0.5rem;
        }

        .help-section p {
            color: #ccc;
            margin-bottom: 0.5rem;
        }

        .help-section ul {
            color: #ccc;
            margin-left: 1rem;
        }

        .help-section li {
            margin-bottom: 0.25rem;
        }

        @media (max-width: 768px) {
            .portal-grid {
                grid-template-columns: 1fr;
            }
            
            .portal-container h2 {
                font-size: 2rem;
            }

            .portal-container {
                padding: 0 1rem;
            }

            .quick-access-grid {
                grid-template-columns: 1fr;
            }
        }