    :root {
      --primary: #2c3e50;
      --secondary: #34495e;
      --success: #27ae60;
      --danger: #c0392b;
      --warning: #f1c40f;
      --light: #e3e7ea;
      --dark: #2c3e50;
      --tab-active: #34495e;
      --tab-hover: #2c3e50;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    body {
      background: var(--light);
      min-height: 100vh;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    .header {
      background: var(--primary);
      color: white;
      padding: 1rem;
      text-align: center;
      margin-bottom: 1rem;
      border-radius: 8px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .header h1 {
      margin-bottom: 1rem;
      font-size: 2rem;
      text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    }

    .card {
      background: white;
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .form-group {
      margin-bottom: 1rem;
    }

    .form-control {
      width: 100%;
      padding: 8px;
      border: 1px solid #ddd;
      border-radius: 4px;
      margin-top: 5px;
    }

    .btn {
      padding: 10px 20px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.3s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-width: 100px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .btn-primary {
      background: linear-gradient(45deg, var(--primary), var(--secondary));
      color: white;
    }

    .btn-danger {
      background: linear-gradient(45deg, var(--danger), #e74c3c);
      color: white;
    }

    .btn-warning {
      background: linear-gradient(45deg, var(--warning), #f39c12);
      color: var(--dark);
    }

    .btn:hover {
      opacity: 1;
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .btn:active {
      transform: translateY(0);
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .tabs {
      display: flex;
      gap: 1rem;
      margin-bottom: 1rem;
      padding: 1rem;
      border-radius: 8px;
      background: var(--light);
    }

    .tab {
      padding: 10px 20px;
      border: none;
      background: linear-gradient(45deg, var(--primary), var(--secondary));
      color: white;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.3s ease;
      font-weight: 600;
      min-width: 120px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      opacity: 0.9;
    }

    .tab[href] {
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .tab[href]:hover {
      color: white;
    }

    .tab[href]:active {
      transform: translateY(0);
    }

    .tab:hover {
      background: linear-gradient(45deg, var(--tab-hover), var(--secondary));
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
      opacity: 1;
    }

    .tab.active {
      background: linear-gradient(45deg, var(--tab-active), var(--primary));
      box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
      transform: translateY(0);
      opacity: 1;
    }

    .table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 1rem;
      min-width: 800px; /* Ensures tables are scrollable on mobile */
    }

    .table th,
    .table td {
      padding: 12px;
      text-align: left;
      border-bottom: 1px solid #ddd;
    }

    .table th {
      background: var(--primary);
      color: white;
    }

    .table tr:hover {
      background: #f5f5f5;
    }

    .alert {
      padding: 1rem;
      border-radius: 4px;
      margin-bottom: 1rem;
    }

    .alert-success {
      background: #d4edda;
      color: #155724;
    }

    .alert-danger {
      background: #f8d7da;
      color: #721c24;
    }

    .stock-critical {
      background-color: rgba(192, 57, 43, 0.1);
    }

    .stock-warning {
      background-color: rgba(241, 196, 15, 0.1);
    }

    .search-container {
      margin-bottom: 1rem;
    }

    .filters {
      display: flex;
      gap: 1rem;
      margin-bottom: 1rem;
    }

    .tab-content {
      display: none;
    }

    .tab-content.active {
      display: block;
    }

    .toast {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: linear-gradient(45deg, var(--success), #2ecc71);
      color: white;
      padding: 15px 25px;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-out 2.7s forwards;
      z-index: 1000;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    @keyframes slideIn {
      from {
        transform: translateX(100%);
        opacity: 0;
      }
      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    @keyframes fadeOut {
      from {
        transform: translateX(0);
        opacity: 1;
      }
      to {
        transform: translateX(100%);
        opacity: 0;
      }
    }

    textarea.form-control {
      min-height: 80px;
      resize: vertical;
    }

    #movementsTable td {
      vertical-align: middle;
    }

    .nav-menu {
      position: sticky;
      top: 0;
      background: var(--light);
      padding: 1rem;
      border-radius: 8px;
      margin: 1rem 0;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
      z-index: 100;
    }

    .nav-menu ul {
      list-style: none;
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      margin: 0;
      padding: 0;
    }

    .nav-link {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.75rem 1rem;
      background: linear-gradient(45deg, var(--primary), var(--secondary));
      color: white;
      text-decoration: none;
      border-radius: 6px;
      font-weight: 600;
      transition: all 0.3s ease;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .nav-link:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .hamburger-menu {
      display: none;
      flex-direction: column;
      gap: 4px;
      padding: 8px;
      background: none;
      border: none;
      cursor: pointer;
    }

    .hamburger-line {
      width: 24px;
      height: 3px;
      background: var(--primary);
      transition: all 0.3s;
      border-radius: 2px;
    }

    .hamburger-menu.active .hamburger-line:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-menu.active .hamburger-line:nth-child(2) {
      opacity: 0;
    }

    .hamburger-menu.active .hamburger-line:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }

    @media (max-width: 768px) {
      .container {
        padding: 10px;
      }

      .header h1 {
        font-size: 1.5rem;
      }

      .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--light);
        transition: left 0.3s ease;
        z-index: 1000;
        padding-top: 60px;
      }

      .nav-menu.active {
        left: 0;
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
      }

      .nav-menu ul {
        flex-direction: column;
        padding: 20px;
      }

      .nav-link {
        width: 100%;
        justify-content: flex-start;
      }
      
      .nav-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
      }
      
      .nav-menu-overlay.active {
        display: block;
      }
      
      .hamburger-menu {
        display: flex;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1001;
      }

      .tabs {
        flex-direction: column;
        gap: 0.5rem;
      }

      .tab {
        width: 100%;
      }

      .filters {
        flex-direction: column;
        gap: 0.5rem;
      }

      .btn {
        width: 100%;
        margin-bottom: 0.5rem;
      }

      .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
      }

      .table th,
      .table td {
        padding: 8px;
        font-size: 0.9rem;
      }

      #history {
        overflow-x: auto;
      }

      #history > div {
        flex-direction: column;
        align-items: stretch !important;
      }

      #history .btn {
        width: 100%;
        margin-bottom: 0.5rem;
      }

      .form-group {
        margin-bottom: 0.75rem;
      }

      .card {
        padding: 15px;
      }

      .modal-dialog {
        width: 95%;
        margin: 10px;
      }
    }

    @media (hover: none) {
      .btn,
      .tab,
      .nav-link {
        min-height: 44px;
      }

      .form-control {
        min-height: 44px;
      }
    }

    .table-wrapper {
      overflow-x: auto;
      margin: 0 -15px;
      padding: 0 15px;
    }
    
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 999;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal-dialog {
      background: white;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      min-width: 300px;
      max-width: 90%;
    }

    .modal-header {
      margin-bottom: 15px;
    }

    .modal-header h3 {
      margin: 0;
    }

    .modal-input {
      width: 100%;
      padding: 8px;
      border: 1px solid #ddd;
      border-radius: 4px;
      margin-bottom: 15px;
    }

    .modal-footer {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 20px;
    }

    .modal-btn {
      padding: 8px 16px;
      border-radius: 4px;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.3s ease;
    }

    .modal-btn-cancel {
      background: var(--light);
      border: 1px solid #ddd;
    }

    .modal-btn-confirm {
      background: var(--primary);
      color: white;
      border: none;
    }

    .modal-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }