:root {
    --primary: #e63946; /* Red */
    --primary-hover: #c1121f;
    --primary-light: rgba(230, 57, 70, 0.1);
    --secondary: #1d3557; /* Dark blue */
    --secondary-light: rgba(29, 53, 87, 0.1);
    --accent: #457b9d; /* Medium blue */
    --success: #2a9d8f;
    --success-light: rgba(42, 157, 143, 0.1);
    --warning: #e9c46a;
    --warning-light: rgba(233, 196, 106, 0.1);
    --danger: #e63946;
    --danger-light: rgba(230, 57, 70, 0.1);
    --dark: #1d3557;
    --darker: #0d1b2a;
    --light: #f9fafb;
    --white: #ffffff;
    --text: #e2e8f0;
    --text-secondary: #a8b2d1;
    --border: #2c4875;
    --card-bg: #1d3557;
    --sidebar: #0d1b2a;
    --hover: #2c4875;
    --transition: all 0.3s ease;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--darker);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
  }
  
  a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
  }
  
  a:hover {
    opacity: 0.8;
  }
  
  /* Typography */
  h1, h2, h3, h4, h5, h6 {
    color: var(--light);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
  }
  
  /* Layout */
  .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
  }
  
  .dashboard {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem 0;
    grid-template-columns: 1fr;
  }
  
  @media (min-width: 768px) {
    .dashboard {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (min-width: 1024px) {
    .dashboard {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  .dashboard-header, 
  .dashboard-full {
    grid-column: 1 / -1;
  }
  
  /* Cards */
  .card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }
  
  .window {
    margin-bottom: 15px;
    height: 50%;
    width: 70vw;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    opacity: 0;
    transition: var(--transition);
  }
  
  .card:hover::before {
    opacity: 1;
  }
  
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }
  
  .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .card-title i {
    font-size: 1.2rem;
    color: var(--white);
    background: var(--primary);
    padding: 0.5rem;
    border-radius: 0.375rem;
  }
  
  /* Navigation */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  
  .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .logo i {
    color: white;
    background: var(--primary);
    padding: 0.5rem;
    border-radius: 0.375rem;
  }
  
  .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
  }
  
  .nav-link {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
  }
  
  .nav-link:hover {
    color: var(--light);
    background: var(--hover);
  }
  
  .nav-link.active {
    color: var(--light);
    background: var(--primary);
  }
  
  .nav-link i {
    font-size: 1rem;
  }
  
  .tab-content {
    position: relative;
  }
  
  .tab-pane {
    display: none !important;
    animation: fadeUp 0.5s;
  }
  
  .tab-pane.active {
    display: block !important;
  }
  
  #StatusTab {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
  }

  /* Forms */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--white);
  }
  
  input[type="password"], 
  select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
  }
  
  input[type="password"]:focus, 
  select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.3);
  }
  
  select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
    border: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  }
  
  .btn:hover {
    transform: translateY(-1px);
  }
  
  .btn:active {
    transform: translateY(1px);
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
  }
  
  .btn-primary:hover {
    background: var(--primary-hover);
  }
  
  .btn-danger {
    background: var(--danger);
    color: white;
  }
  
  .btn-danger:hover {
    background: rgba(239, 68, 68, 0.8);
  }
  
  .btn-warning {
    background: var(--warning);
    color: var(--darker);
  }
  
  .btn-warning:hover {
    background: rgba(245, 158, 11, 0.8);
  }
  
  .btn-secondary {
    background: var(--hover);
    color: var(--text);
  }
  
  .btn-secondary:hover {
    background: rgba(51, 65, 85, 0.8);
  }
  
  .logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.9rem;
    border: 1px solid var(--border);
  }
  
  .logout-btn:hover {
    background: var(--hover);
    color: var(--light);
  }
  
  /* Utilities */
  .flex {
    display: flex;
    align-items: center;
  }
  
  .gap-2 {
    gap: 0.5rem;
  }
  
  .justify-between {
    justify-content: space-between;
  }
  
  .mb-4 {
    margin-bottom: 1.5rem;
  }
  
  .w-full {
    width: 100%;
  }
  
  .text-success {
    color: var(--success);
  }
  
  .text-danger {
    color: var(--danger);
  }
  
  .text-warning {
    color: var(--warning);
  }
  
  .text-primary {
    color: var(--primary);
  }
  
  /* Notifications */
  .notification {
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: slideDown 0.4s ease;
  }
  
  .notification i {
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
  }
  
  .notification-success {
    background: var(--success-light);
    border: 1px solid var(--success);
  }
  
  .notification-success i {
    color: var(--success);
    background: rgba(16, 185, 129, 0.2);
  }
  
  .notification-error {
    background: var(--danger-light);
    border: 1px solid var(--danger);
  }
  
  .notification-error i {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.2);
  }
  
  /* System alerts */
  .system-alerts {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s;
  }

  .system-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
  }

  .system-alert:last-child {
    margin-bottom: 0;
  }

  .system-alert i {
    font-size: 1.25rem;
  }

  .system-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-left: 4px solid var(--danger);
  }

  .system-alert-danger i {
    color: var(--danger);
  }

  .system-alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-left: 4px solid var(--warning);
  }

  .system-alert-warning i {
    color: var(--warning);
  }

  .alert-message {
    font-weight: 500;
  }

  /* Status components */
  .progress-container {
    width: 100%;
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 1rem;
    overflow: hidden;
    margin: 0.75rem 0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  }
  
  .progress-bar {
    height: 100%;
    border-radius: 1rem;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .stat-card {
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
  }
  
  .stat-card:hover {
    transform: translateY(-3px);
    background: rgba(0, 0, 0, 0.25);
  }
  
  .stat-icon {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--white);
    background: var(--primary);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
  }
  
  .stat-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.1) 50%);
  }
  
  .stat-value {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  /* Tables */
  table {
    width: 100%;
    border-collapse: collapse;
  }
  
  th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
  
  th {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  tr:hover td {
    background: var(--hover);
  }
  
  td {
    vertical-align: middle;
  }
  
  .status-card table {
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .status-card th {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    width: 40%;
  }
  
  .status-card td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--light);
  }
  
  .status-card tr:last-child th,
  .status-card tr:last-child td {
    border-bottom: none;
  }
  
  .status-card tr:hover td {
    background: rgba(255, 255, 255, 0.05);
  }
  
  /* Output Console */
  .output-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius);
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-wrap;
    border: 1px solid var(--border);
  }

  /* Code Containers for shell output */
  .code-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius);
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-wrap;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
  }

  /* Chart container styles */
  .chart-container {
    height: 250px;
    background: rgba(0, 0, 0, 0.15);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }

  /* File browser styles */
  .file-browser {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.15);
  }

  .file-browser table {
    margin: 0;
  }

  .file-browser th, 
  .file-browser td {
    padding: 0.75rem;
  }

  .file-browser tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
    overflow-y: auto;
  }
  
  .modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    margin: 5% auto;
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    box-shadow: var(--shadow);
    animation: slideUp 0.3s;
    border: 1px solid var(--border);
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }
  
  .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .modal-title i {
    color: var(--warning);
  }
  
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }
  
  /* Spinner */
  .spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 0.2rem solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--light);
    animation: spin 0.8s linear infinite;
    margin-left: 0.75rem;
  }
  
  /* Login page */
  .login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--darker);
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.9), rgba(29, 53, 87, 0.8));
  }
  
  .flag-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1516738901171-8eb4fc13bd20?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    filter: blur(2px);
    z-index: 1;
  }
  
  .login-card {
    background: rgba(29, 53, 87, 0.85);
    border-radius: var(--radius);
    width: 90%;
    max-width: 450px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 100;
    animation: fadeIn 0.8s ease;
  }
  
  .login-header {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .login-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
  }
  
  .login-logo i {
    font-size: 2rem;
    color: white;
    background: var(--primary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: float 3s ease infinite;
  }
  
  .login-header p {
    color: var(--text);
    font-size: 1.1rem;
  }
  
  .input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
  }
  
  .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
  }
  
  input[type="password"] {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
  }
  
  input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.3);
  }
  
  .login-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
  }
  
  .login-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .flag-decoration {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
  }
  
  .flag {
    height: 6px;
    flex: 1;
  }
  
  .flag.red {
    background: var(--primary);
  }
  
  .flag.white {
    background: var(--white);
  }
  
  .flag.blue {
    background: var(--accent);
  }

  /* Dashboard content - Add flag specific styles */
  .card-title i {
    font-size: 1.2rem;
    color: var(--white);
    background: var(--primary);
    padding: 0.5rem;
    border-radius: 0.375rem;
  }
  
  .logo i {
    color: white;
    background: var(--primary);
    padding: 0.5rem;
    border-radius: 0.375rem;
  }
  
  .stat-icon {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--white);
    background: var(--primary);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
  }
  
  /* Animations */
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
  }
  
  @keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
  }
  
  .hidden {
    display: none;
  }