 body {
      font-family: "Inter", "Segoe UI", sans-serif;
      background: linear-gradient(135deg, #f3f6fb, #e9ecf3);
      color: #212529;
    }

    /* Sidebar */
    .sidebar {
      width: 250px;
      position: fixed;
      top: 0;
      left: 0;
      height: 100vh;
      background: #1f2937;
      backdrop-filter: blur(12px);
      padding: 25px 15px;
      box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }
    .sidebar .brand {
      font-size: 22px;
      font-weight: 700;
      color: #fff;
      margin-bottom: 40px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .sidebar .nav-link {
      color: #cbd5e1;
      font-weight: 500;
      margin: 8px 0;
      padding: 12px 16px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      transition: all 0.3s;
    }
    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
      background: linear-gradient(90deg, #2563eb, #60a5fa);
      color: #fff;
    }
    /* Submenu links - no pointer, no hover effect */
    .sidebar .nav-link.submenu-link {
      cursor: default;
    }
    .sidebar .nav-link.submenu-link:hover {
      background: transparent;
      color: #cbd5e1;
    }
    .sidebar .nav-link.submenu-link.active {
      background: rgba(59, 130, 246, 0.25);
      color: #3b82f6;
    }

    /* Topbar */
    .topbar {
      margin-left: 250px;
      height: 70px;
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.08);
      position: sticky;
      top: 0;
      z-index: 100;
      transition: margin-left 0.3s ease, width 0.3s ease;
    }
    
    .topbar h3 {
      margin: 0;
      font-weight: 700;
      color: #1f2937;
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding-right: 15px;
    }
    
    .user-profile {
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      flex-shrink: 0;
    }
    
    .user-profile .dropdown-toggle {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    
    .user-profile img {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    
    .user-profile .fw-semibold {
      white-space: nowrap;
    }
    
    /* Sidebar collapsed state */
    body.sidebar-collapsed .topbar {
      margin-left: 70px;
    }
    
    body.sidebar-collapsed .content {
      margin-left: 70px;
    }

    /* Content */
    .content {
      margin-left: 250px;
      padding: 30px;
    }

    /* Card */
    .card {
      border: none;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.75);
      backdrop-filter: blur(15px);
      box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    }
    .card-body {
      padding: 1.8rem;
    }

    /* Table */
    .table {
      border-collapse: separate;
      border-spacing: 0 10px;
    }
    .table thead th {
      background: #f1f5f9;
      border: none;
      padding: 12px;
      font-weight: 600;
      color: #334155;
    }
    .table tbody tr {
      background: #fff;
      box-shadow: 0 3px 8px rgba(0,0,0,0.05);
      border-radius: 12px;
      overflow: hidden;
      transition: all 0.3s;
    }
    .table tbody tr:hover {
      transform: scale(1.01);
      box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    }
    .table td {
      border: none;
      padding: 14px;
      vertical-align: middle;
    }

    /* Buttons */
    .btn-icon {
      border-radius: 50%;
      width: 34px;
      height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: 0.3s;
    }
    .btn-icon:hover {
      transform: scale(1.1);
    }

    /* Floating Add Button */
   /* Button on top-right of card */
  .fab-top {
      position: absolute;
      top: -20px;   /* adjust so it floats above card */
      right: 20px;
      background: linear-gradient(135deg, #2563eb, #60a5fa);
      color: #fff;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
      text-decoration: none;
      transition: 0.3s;
      z-index: 10;
    }
    .fab-top:hover {
      transform: rotate(90deg) scale(1.1);
    }

    /* Footer */
    .footer {
      margin-left: 250px;
      background: #1f2937;
      color: #fff;
      text-align: center;
      padding: 18px;
      margin-top: 50px;
      border-top: 3px solid #2563eb;
    }

    .table-responsive {
    overflow-x: hidden;  /* stop scrollbar */
    }
    .table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    }

    .container {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 15px;
    } 

    h2 {
    margin-top: 0;
    font-weight: 600;
    color: #111827;
    margin-bottom: 30px;
    font-size: 1.9rem;
    text-align: center;
    }

    /* Form group with floating label */
  .form-group {
    position: relative;
    margin-bottom: 25px;
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 14px 45px 14px 40px;
    border-radius: 10px;
    border: 1px solid #041835;
    font-size: 0.95rem;
    background-color: #f9fafb;
    transition: all 0.25s ease;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    outline: none;
  }

  .form-group label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0 5px;
    color: #6b7280;
    font-size: 0.95rem;
    pointer-events: none;
    transition: 0.25s ease all;
  }

  .form-group input:focus + label,
  .form-group input:not(:placeholder-shown) + label,
  .form-group textarea:focus + label,
  .form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 35px;
    font-size: 0.8rem;
    color: #2563eb;
  }

  .form-group .icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1rem;
  }

  textarea {
    resize: vertical;
    min-height: 100px;
  }

  /* Standard label-above-input styling (for forms with .form-label class) */
  .form-group .form-label {
    position: static !important;
    display: block;
    margin-bottom: 6px;
    transform: none !important;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
    background: transparent;
    padding: 0;
  }
  
  .form-group .form-label + input,
  .form-group .form-label + select,
  .form-group .form-label + textarea {
    padding: 12px 16px !important;
  }
  
  /* Card-based forms with better spacing */
  .card .form-group {
    margin-bottom: 1.25rem;
  }
  
  .card .form-group:last-child {
    margin-bottom: 0;
  }
  
  /* Real-time validation */
  .form-group.valid input,
  .form-group.valid textarea {
    border-color: #16a34a;
  }

  .form-group.invalid input,
  .form-group.invalid textarea {
    border-color: #dc2626;
  }
  
  /* Improved form validation states */
  .form-control.is-valid {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
  }
  
  .form-control.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
  }
  
  /* Form validation messages */
  .invalid-feedback {
    display: none;
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 4px;
  }
  
  .valid-feedback {
    display: none;
    color: #16a34a;
    font-size: 0.85rem;
    margin-top: 4px;
  }
  
  .form-control.is-invalid ~ .invalid-feedback,
  .was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
  }
  
  .form-control.is-valid ~ .valid-feedback,
  .was-validated .form-control:valid ~ .valid-feedback {
    display: block;
  }
  
  /* Required field asterisk */
  .text-danger {
    color: #dc2626 !important;
  }
  
  /* Improved form button styling */
  .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
  }
  
  /* Modern select styling */
  .form-select, select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 36px !important;
  }
  
  /* Better disabled state */
  .form-control:disabled, .form-control[readonly] {
    background-color: #f3f4f6;
    opacity: 0.7;
    cursor: not-allowed;
  }
  
  /* Input group improvements */
  .input-group {
    position: relative;
  }
  
  .input-group-text {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #6b7280;
  }
  
  /* Checkbox and radio improvements */
  .form-check {
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
  }
  
  .form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.2em;
    margin-left: -1.75rem;
    cursor: pointer;
  }
  
  .form-check-label {
    cursor: pointer;
    font-weight: 400;
    color: #374151;
  }
  
  .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
  }
  
  .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  }

  .hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
  }

  /* forms buttons */
  .formbtn-group {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
  }

  .formbtn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
  }

  .formbtn-save {
    background-color: #2563eb;
    color: white;
  }

  .formbtn-save:hover {
    background-color: #1d4ed8;
    transform: scale(1.05);
  }

  .formbtn-cancel {
    background-color: #e5e7eb;
    color: #374151;
  }

  .formbtn-cancel:hover {
    background-color: #d1d5db;
    transform: scale(1.05);
  }

  .formcard {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 40px 40px; /* Increase padding */
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.form-group input,
.form-group textarea {
    border-radius: 12px; /* Slightly larger radius */
    padding: 14px 45px 14px 40px; /* Adjust inner spacing */
}

/* Fix for Bootstrap collapse inside fixed sidebar */
.sidebar .collapse {
  position: relative;
  overflow: visible !important;
}

.sidebar .collapse.show {
  display: block !important;
  visibility: visible !important;
}

.sidebar .nav-item.dropdown {
  overflow: visible !important;
}
