        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

        body {
          font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
          background: #f1f5f9;
          /* Slate-100 */
          color: #334155;
          /* Slate-700 */
          display: flex;
          min-height: 100vh;
        }

        .nav-pane {
          width: 350px;
          background: #0f172a;
          /* Slate-900 */
          color: #e2e8f0;
          /* Slate-200 */
          padding: 1.5rem 1rem;
          box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
          position: fixed;
          height: 100vh;
          overflow-y: auto;
          z-index: 100;
          border-right: 1px solid #1e293b;
        }

        .nav-header {
          padding: 1.5rem;
          margin-bottom: 0.5rem;
          /* Reduced from 1rem */
          color: #f8fafc;
        }

        .nav-header h2 {
          font-size: 1.5rem;
          font-weight: 700;
          display: flex;
          align-items: center;
          gap: 0.75rem;
          letter-spacing: -0.025em;
          margin-bottom: 0.25rem;
        }

        .sub-text {
          font-size: 0.8rem;
          color: #94a3b8;
          /* Slate-400 */
          text-transform: uppercase;
          letter-spacing: 0.1em;
          font-weight: 600;
          margin-left: 2.75rem;
          /* Align with text of h2 (icon width + gap) */
        }

        .nav-menu {
          padding: 0.25rem 0;
          /* Reduced from 0.5rem */
        }

        .nav-item {
          display: flex;
          align-items: center;
          gap: 0.75rem;
          padding: 0.6rem 1.5rem;
          /* Reduced from 0.875rem */
          color: #94a3b8;
          /* Slate-400 */
          text-decoration: none;
          transition: all 0.2s ease;
          border-left: 3px solid transparent;
          font-weight: 500;
          margin-bottom: 0.15rem;
          /* Reduced from 0.25rem */
          border-radius: 0 8px 8px 0;
          margin-right: 1rem;
        }

        .nav-item:hover:not(.disabled) {
          background: #1e293b;
          /* Slate-800 */
          color: #f1f5f9;
        }

        .nav-item.active {
          background: #1e293b;
          /* Slate-800 */
          color: #38bdf8;
          /* Sky-400 */
          border-left-color: #38bdf8;
        }

        .nav-item.disabled {
          cursor: not-allowed;
          opacity: 0.5;
        }

        .nav-item i {
          width: 20px;
          text-align: center;
          font-size: 1.1rem;
        }

        .main-content {
          flex: 1;
          margin-left: 350px;
          display: flex;
          flex-direction: column;
        }

        .header {
          background: white;
          border-bottom: 1px solid #e2e8f0;
          padding: 1rem 2rem;
          box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
          position: sticky;
          top: 0;
          z-index: 50;
        }

        .header-content {
          max-width: 2400px;
          margin: 0 auto;
          display: flex;
          justify-content: space-between;
          align-items: center;
        }

        .header h1 {
          font-size: 1.5rem;
          font-weight: 700;
          color: #0f172a;
          /* Slate-900 */
          letter-spacing: -0.025em;
        }

        .user-info {
          display: flex;
          align-items: center;
          gap: 1.5rem;
        }

        .user-info span {
          font-weight: 500;
          color: #64748b;
          font-size: 0.95rem;
        }

        .logout-btn {
          background: white;
          color: #ef4444;
          /* Red-500 */
          border: 1px solid #fee2e2;
          padding: 0.5rem 1rem;
          border-radius: 6px;
          text-decoration: none;
          font-weight: 600;
          transition: all 0.2s ease;
          font-size: 0.875rem;
        }

        .logout-btn:hover {
          background: #fee2e2;
          border-color: #fecaca;
        }

        .container {
          flex: 1;
          max-width: 2400px;
          margin: 0 auto;
          padding: 2rem;
        }

        .welcome-section {
          background: #ffffff;
          border-radius: 12px;
          padding: 2.5rem;
          margin-bottom: 2rem;
          box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
          border: 1px solid #e2e8f0;
          background-image: linear-gradient(to right, #f8fafc 0%, #ffffff 100%);
        }

        .welcome-section h2 {
          color: #0f172a;
          font-size: 1.875rem;
          font-weight: 700;
          margin-bottom: 0.75rem;
          letter-spacing: -0.025em;
        }

        .welcome-section p {
          color: #64748b;
          font-size: 1.125rem;
          line-height: 1.6;
          max-width: 65ch;
        }

        .stats-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
          gap: 1.5rem;
          margin-bottom: 2.5rem;
        }

        .stats-card {
          background: white;
          border-radius: 12px;
          padding: 1.5rem;
          box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
          border: 1px solid #e2e8f0;
          transition: transform 0.2s, box-shadow 0.2s;
        }

        .stats-card:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
        }

        .stats-header {
          display: flex;
          align-items: center;
          gap: 1rem;
          margin-bottom: 1.5rem;
          padding-bottom: 1rem;
          border-bottom: 1px solid #f1f5f9;
        }

        .stats-icon {
          width: 48px;
          height: 48px;
          border-radius: 10px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 1.25rem;
          flex-shrink: 0;
        }

        .stats-icon.client {
          background: #eff6ff;
          /* Blue-50 */
          color: #2563eb;
          /* Blue-600 */
        }

        .stats-icon.subscription {
          background: #f0f9ff;
          /* Sky-50 */
          color: #0ea5e9;
          /* Sky-500 */
        }

        .stats-icon.support {
          background: #f5f3ff;
          /* Violet-50 */
          color: #8b5cf6;
          /* Violet-500 */
        }

        .stats-title {
          font-size: 1.125rem;
          font-weight: 600;
          color: #0f172a;
          margin: 0;
        }

        .stats-content {
          display: grid;
          gap: 0.75rem;
        }

        .stat-item {
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding: 0.75rem;
          background: #f8fafc;
          border-radius: 8px;
          border: 1px solid #f1f5f9;
        }

        .stat-label {
          font-weight: 500;
          color: #64748b;
          font-size: 0.875rem;
        }

        .stat-value {
          font-weight: 600;
          color: #0f172a;
          font-size: 1rem;
          font-family: 'Inter', monospace;
        }

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

        .dashboard-card {
          background: white;
          border-radius: 12px;
          padding: 1.75rem;
          box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
          border: 1px solid #e2e8f0;
          transition: transform 0.2s, box-shadow 0.2s;
        }

        .dashboard-card:hover {
          transform: translateY(-2px);
          box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
        }

        .card-header {
          display: flex;
          align-items: center;
          gap: 1rem;
          margin-bottom: 1.25rem;
        }

        .card-icon {
          width: 42px;
          height: 42px;
          border-radius: 10px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 1.125rem;
        }

        .card-icon.account {
          background: #ecfdf5;
          color: #059669;
        }

        .card-icon.billing {
          background: #eff6ff;
          color: #2563eb;
        }

        .card-icon.support {
          background: #fff1f2;
          color: #e11d48;
        }

        .card-icon.resources {
          background: #fff7ed;
          color: #ea580c;
        }

        .card-title {
          font-size: 1.125rem;
          font-weight: 600;
          color: #0f172a;
        }

        .card-content {
          color: #64748b;
          line-height: 1.6;
          margin-bottom: 1.75rem;
          font-size: 0.95rem;
        }

        .card-actions {
          display: flex;
          gap: 0.75rem;
          flex-wrap: wrap;
        }

        .btn {
          background: #0f172a;
          /* Slate-900 */
          color: white;
          border: none;
          padding: 0.625rem 1.25rem;
          border-radius: 6px;
          font-size: 0.875rem;
          font-weight: 500;
          cursor: pointer;
          transition: all 0.2s ease;
          text-decoration: none;
          display: inline-flex;
          align-items: center;
          gap: 0.5rem;
          box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        }

        .btn:hover {
          background: #1e293b;
          /* Slate-800 */
          transform: translateY(-1px);
          box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        }

        .btn-secondary {
          background: white;
          color: #334155;
          border: 1px solid #cbd5e1;
        }

        .btn-secondary:hover {
          background: #f8fafc;
          border-color: #94a3b8;
          color: #0f172a;
        }

        .coming-soon {
          text-align: center;
          color: #94a3b8;
          font-style: italic;
          padding: 1rem;
        }

        .coming-soon i {
          font-size: 2.5rem;
          margin-bottom: 0.75rem;
          opacity: 0.5;
        }

        @media (max-width: 1024px) {
          .container {
            padding: 1.5rem;
          }

          .dashboard-grid,
          .stats-grid {
            grid-template-columns: 1fr;
          }
        }

        @media (max-width: 768px) {
          .nav-pane {
            display: none;
          }

          /* Or updated mobile menu pattern */
          .main-content {
            margin-left: 0;
          }

          .header {
            padding: 1rem;
          }
        }

        /* --- Page Header & Actions --- */
        .page-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 2rem;
        }

        .page-title {
          font-size: 1.875rem;
          font-weight: 700;
          color: #0f172a;
          margin: 0;
          letter-spacing: -0.025em;
        }

        /* --- Data Tables --- */
        .users-table {
          background: white;
          border-radius: 12px;
          box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
          border: 1px solid #e2e8f0;
          overflow: hidden;
          margin-bottom: 2rem;
        }

        .table-header {
          background: #f8fafc;
          padding: 1rem 1.5rem;
          border-bottom: 1px solid #e2e8f0;
          display: flex;
          justify-content: space-between;
          align-items: center;
        }

        .table-title {
          font-size: 1.125rem;
          font-weight: 600;
          color: #0f172a;
          margin: 0;
        }

        .table-content {
          overflow-x: auto;
          max-height: 650px;
          overflow-y: auto;
        }

        table {
          width: 100%;
          border-collapse: collapse;
        }

        th,
        td {
          padding: 1rem 1.5rem;
          text-align: left;
          border-bottom: 1px solid #f1f5f9;
        }

        th {
          background: #f8fafc;
          font-weight: 600;
          color: #475569;
          font-size: 0.75rem;
          text-transform: uppercase;
          letter-spacing: 0.05em;
          position: sticky;
          top: 0;
          z-index: 10;
        }

        td {
          color: #334155;
          font-size: 0.95rem;
        }

        tr:hover td {
          background: #f8fafc;
        }

        /* --- Badges --- */
        .role-badge,
        .status-badge {
          display: inline-flex;
          align-items: center;
          padding: 0.25rem 0.75rem;
          border-radius: 9999px;
          font-size: 0.75rem;
          font-weight: 600;
          text-transform: capitalize;
        }

        .role-admin {
          background: #fee2e2;
          color: #b91c1c;
        }

        /* Red-100/700 for Admin */
        .role-view-only {
          background: #eff6ff;
          color: #1d4ed8;
        }

        /* Blue-100/700 */

        .status-active {
          background: #ecfdf5;
          color: #047857;
        }

        /* Emerald */
        .status-inactive {
          background: #f1f5f9;
          color: #64748b;
        }

        /* Slate */

        /* --- Action Buttons (Icons) --- */
        .actions {
          display: flex;
          gap: 0.5rem;
        }

        .action-btn {
          padding: 0.4rem;
          border: 1px solid transparent;
          border-radius: 6px;
          cursor: pointer;
          font-size: 0.875rem;
          transition: all 0.2s ease;
          background: transparent;
          color: #64748b;
        }

        .action-btn:hover {
          background: #f1f5f9;
          color: #0f172a;
        }

        .action-btn.edit:hover {
          background: #eff6ff;
          color: #2563eb;
        }

        .action-btn.delete:hover {
          background: #fee2e2;
          color: #ef4444;
        }

        .action-btn.reset:hover {
          background: #fff7ed;
          color: #ea580c;
        }

        .action-btn.disable-2fa:hover {
          background: #f5f3ff;
          color: #8b5cf6;
        }

        /* --- Filters --- */
        .filters-section {
          background: white;
          padding: 1rem 1.5rem;
          border-bottom: 1px solid #e2e8f0;
        }

        .filters-row {
          display: flex;
          gap: 1.5rem;
          align-items: flex-end;
          flex-wrap: wrap;
        }

        .filter-group {
          display: flex;
          flex-direction: column;
          gap: 0.375rem;
        }

        .filter-group label {
          font-size: 0.75rem;
          font-weight: 600;
          color: #64748b;
          text-transform: uppercase;
          letter-spacing: 0.025em;
        }

        .filter-group input,
        .filter-group select {
          padding: 0.5rem 0.75rem;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          font-size: 0.875rem;
          min-width: 180px;
          color: #0f172a;
          background: #fff;
        }

        .filter-group input:focus,
        .filter-group select:focus {
          outline: none;
          border-color: #2563eb;
          box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
        }

        /* --- Modals --- */
        .modal {
          display: none;
          position: fixed;
          z-index: 1000;
          left: 0;
          top: 0;
          width: 100%;
          height: 100%;
          background-color: rgba(15, 23, 42, 0.75);
          /* Slate-900 with opacity */
          backdrop-filter: blur(4px);
          animation: fadeIn 0.2s ease-out;
        }

        .modal-content {
          background-color: #fff;
          margin: 5vh auto;
          padding: 0;
          border-radius: 12px;
          width: 90%;
          max-width: 550px;
          box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
          animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
          overflow: hidden;
        }

        .modal-header {
          background: white;
          color: #0f172a;
          padding: 1.5rem;
          display: flex;
          justify-content: space-between;
          align-items: center;
          border-bottom: 1px solid #e2e8f0;
        }

        .modal-header h3 {
          margin: 0;
          font-size: 1.25rem;
          font-weight: 600;
          display: flex;
          align-items: center;
          gap: 0.75rem;
        }

        .modal-close {
          background: none;
          border: none;
          color: #94a3b8;
          font-size: 1.5rem;
          cursor: pointer;
          padding: 0.25rem;
          border-radius: 6px;
          transition: all 0.2s;
          line-height: 1;
        }

        .modal-close:hover {
          background: #f1f5f9;
          color: #0f172a;
        }

        .modal-body {
          padding: 1.5rem;
        }

        .modal-footer {
          padding: 1rem 1.5rem;
          background-color: #f8fafc;
          border-top: 1px solid #e2e8f0;
          text-align: right;
          display: flex;
          justify-content: flex-end;
          gap: 0.75rem;
        }

        /* Form Styles */
        .form-group {
          margin-bottom: 1.25rem;
        }

        .form-group label {
          display: block;
          color: #334155;
          font-weight: 500;
          margin-bottom: 0.5rem;
          font-size: 0.9rem;
        }

        .form-group input,
        .form-group select {
          width: 100%;
          padding: 0.625rem 0.875rem;
          border: 1px solid #cbd5e1;
          border-radius: 6px;
          font-size: 0.95rem;
          color: #0f172a;
          transition: all 0.2s;
        }

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

        .form-hint {
          display: block;
          margin-top: 0.25rem;
          color: #64748b;
          font-size: 0.8rem;
        }

        /* Alerts */
        .alert {
          padding: 1rem;
          border-radius: 8px;
          margin-bottom: 1rem;
          font-size: 0.9rem;
          font-weight: 500;
          display: flex;
          align-items: start;
          gap: 0.75rem;
        }

        .alert-success {
          background: #ecfdf5;
          color: #047857;
          border: 1px solid #d1fae5;
        }

        .alert-error {
          background: #fef2f2;
          color: #b91c1c;
          border: 1px solid #fee2e2;
        }

        /* Animations */
        @keyframes fadeIn {
          from {
            opacity: 0;
          }

          to {
            opacity: 1;
          }
        }

        @keyframes slideIn {
          from {
            transform: translateY(20px);
            opacity: 0;
          }

          to {
            transform: translateY(0);
            opacity: 1;
          }
        }

        /* Sorting */
        .sortable {
          cursor: pointer;
          user-select: none;
        }

        .column-header {
          display: flex;
          align-items: center;
          gap: 0.5rem;
        }

        .sort-icons {
          display: flex;
          flex-direction: column;
          opacity: 0.3;
          transition: opacity 0.2s;
          font-size: 0.6rem;
          gap: 1px;
        }

        .sortable:hover .sort-icons,
        .sortable.active .sort-icons {
          opacity: 1;
          color: #2563eb;
        }


        /* --- Login & Auth Pages --- */
        body.auth-page {
          background: #f1f5f9;
          min-height: 100vh;
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 1.5rem;
        }

        .login-container {
          background: #ffffff;
          border-radius: 16px;
          padding: 2.5rem;
          box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
          border: 1px solid #e2e8f0;
          max-width: 450px;
          width: 100%;
          position: relative;
          overflow: hidden;
        }

        .login-container::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          height: 4px;
          background: #0f172a;
          /* Slate-900 */
        }

        .auth-header h2 {
          text-align: center;
          color: #0f172a;
          font-size: 1.875rem;
          font-weight: 700;
          margin-bottom: 0.5rem;
          letter-spacing: -0.025em;
        }

        .auth-subtitle {
          text-align: center;
          color: #64748b;
          font-size: 1rem;
          margin-bottom: 2rem;
        }

        .auth-form {
          display: flex;
          flex-direction: column;
          gap: 1.25rem;
        }

        .auth-btn {
          padding: 0.875rem;
          background: #0f172a;
          color: white;
          border: none;
          border-radius: 8px;
          font-size: 1rem;
          font-weight: 600;
          cursor: pointer;
          transition: all 0.2s ease;
          margin-top: 0.5rem;
          width: 100%;
        }

        .auth-btn:hover {
          background: #1e293b;
          transform: translateY(-1px);
          box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        }

        .auth-links {
          text-align: center;
          margin-top: 1.5rem;
          font-size: 0.9rem;
        }

        .auth-links a {
          color: #0f172a;
          text-decoration: none;
          font-weight: 500;
          margin: 0 0.5rem;
          transition: color 0.2s;
        }

        .auth-links a:hover {
          color: #2563eb;
          text-decoration: underline;
        }

        .icon-container {
          text-align: center;
          margin-bottom: 1.5rem;
        }

        .icon-container i {
          font-size: 3rem;
          color: #0f172a;
        }

        /* SSO Styles */
        .sso-login-container {
          margin-top: 1.5rem;
          padding-top: 1.5rem;
          border-top: 1px solid #e2e8f0;
        }

        .sso-login-btn {
          background: #f8fafc;
          color: #334155;
          border: 1px solid #cbd5e1;
          border-radius: 8px;
          padding: 0.875rem;
          font-size: 0.95rem;
          font-weight: 600;
          cursor: pointer;
          transition: all 0.2s ease;
          width: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 0.75rem;
        }

        .sso-login-btn:hover {
          background: #f1f5f9;
          border-color: #94a3b8;
          color: #0f172a;
        }

        .divider {
          display: flex;
          align-items: center;
          text-align: center;
          margin: 1.5rem 0;
          color: #94a3b8;
          font-size: 0.875rem;
        }

        .divider::before,
        .divider::after {
          content: '';
          flex: 1;
          border-bottom: 1px solid #e2e8f0;
        }

        .divider span {
          padding: 0 0.75rem;
        }

        .sso-info {
          background: #f8fafc;
          border: 1px solid #e2e8f0;
          border-radius: 8px;
          padding: 1.25rem;
          margin-bottom: 1.5rem;
          text-align: center;
        }

        .sso-info h3 {
          font-size: 1.1rem;
          margin-bottom: 0.5rem;
          color: #0f172a;
        }