/* ========== Variables ========== */
:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e3a5f;
    --blue-900: #0f172a;

    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;

    --green-50: #f0fdf4;
    --green-500: #22c55e;
    --green-600: #16a34a;

    --red-50: #fef2f2;
    --red-500: #ef4444;
    --red-600: #dc2626;

    --purple-50: #faf5ff;
    --purple-500: #a855f7;

    --cyan-50: #ecfeff;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;

    --teal-50: #f0fdfa;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;

    --yellow-50: #fefce8;
    --yellow-500: #eab308;
    --yellow-600: #ca8a04;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --gradient: linear-gradient(135deg, var(--blue-500), var(--orange-500));

    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);

    --radius: 10px;
    --radius-lg: 16px;

    --sidebar-width: 260px;
}

/* ========== Reset ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ========== Common ========== */
.logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; display: inline-flex; align-items: center; }
.logo img { display: block; max-width: 100%; }
.logo-nafi { color: var(--blue-500); }
.logo-logy { color: var(--orange-500); }
.logo-on-dark img,
.login-left .logo img,
.footer .logo img { filter: brightness(0) invert(1); opacity: .95; }
.hidden { display: none !important; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 10px; font-weight: 600;
    font-size: 0.9rem; transition: all 0.3s; cursor: pointer;
    border: none; font-family: inherit;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,0.4); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-full { width: 100%; justify-content: center; }
.btn-outline-sm {
    padding: 6px 14px; font-size: 0.8rem; border-radius: 8px;
    border: 1px solid var(--gray-200); background: #fff; color: var(--gray-700);
    cursor: pointer; font-family: inherit; font-weight: 500; transition: all 0.2s;
}
.btn-outline-sm:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.btn-success { background: var(--green-500); color: #fff; }
.btn-success:hover { background: var(--green-600); }
.btn-danger { background: var(--red-500); color: #fff; font-size: 0.85rem; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; font-weight: 500; }

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-page { background: var(--gray-50); min-height: 100vh; }

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.login-left {
    background: linear-gradient(135deg, var(--blue-900), var(--blue-800));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(249,115,22,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-left-content { position: relative; max-width: 440px; }
.login-left-content .logo { font-size: 1.8rem; display: block; margin-bottom: 32px; }
.login-left-content h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.login-left-content > p { color: rgba(255,255,255,0.7); font-size: 1.05rem; margin-bottom: 40px; }

.login-features { display: flex; flex-direction: column; gap: 16px; }
.login-feature {
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,0.8); font-size: 0.95rem;
}
.login-feature svg { color: var(--orange-400); flex-shrink: 0; }

.login-right {
    display: flex; align-items: center; justify-content: center;
    padding: 40px;
}

.login-form-container { width: 100%; max-width: 440px; }

.auth-form h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { color: var(--gray-500); margin-bottom: 28px; }

.auth-form .form-group { margin-bottom: 18px; }
.auth-form label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }

.input-icon {
    position: relative;
    display: block;
}
/* Icon kiri - hanya direct child svg */
.input-icon > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    z-index: 2;
}
.input-icon input {
    width: 100%;
    padding: 12px 42px 12px 42px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
    box-sizing: border-box;
}
.input-icon input:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

/* Tombol toggle password di kanan, absolute di dalam .input-icon */
.input-icon .toggle-password {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    color: var(--gray-400) !important;
    padding: 6px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    z-index: 3;
    line-height: 0;
    width: auto !important;
    height: auto !important;
}
.input-icon .toggle-password:hover { background: var(--gray-100) !important; color: var(--gray-600) !important; }
.input-icon .toggle-password svg {
    position: static !important;
    display: block !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
}

/* OTP Input */
.otp-input {
    width: 100%;
    padding: 18px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 12px;
    color: var(--gray-900);
    background: var(--gray-50);
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    box-sizing: border-box;
    outline: none;
}
.otp-input::placeholder {
    color: var(--gray-300);
    letter-spacing: 12px;
}
.otp-input:focus {
    border-color: var(--blue-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Pastikan label OTP juga center dan spacing */
#twoFAForm .form-group label {
    text-align: center;
    display: block;
    margin-bottom: 10px;
}

.form-options {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; font-size: 0.85rem;
}
.checkbox-label { display: flex; align-items: center; gap: 8px; color: var(--gray-600); cursor: pointer; }
.forgot-link { color: var(--blue-600); font-weight: 500; }
.forgot-link:hover { text-decoration: underline; }

.auth-form .btn { margin-top: 8px; padding: 14px; font-size: 1rem; border-radius: var(--radius); }

.auth-switch { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--gray-500); }
.auth-switch a { color: var(--blue-600); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

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

/* ========================================
   PORTAL DASHBOARD
   ======================================== */
.portal-page { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width); background: #fff;
    border-right: 1px solid var(--gray-200);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100; transition: transform 0.3s;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.sidebar-close { display: none; background: none; border: none; cursor: pointer; color: var(--gray-500); }

.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 500; color: var(--gray-600);
    transition: all 0.2s; position: relative;
}
.nav-item:hover { background: var(--gray-50); color: var(--gray-900); }
.nav-item.active { background: var(--blue-50); color: var(--blue-600); font-weight: 600; }
.nav-item.active svg { color: var(--blue-600); }

.nav-badge {
    margin-left: auto; background: var(--red-500); color: #fff;
    font-size: 0.7rem; font-weight: 700;
    padding: 2px 7px; border-radius: 10px;
}

.sidebar-footer { padding: 16px; border-top: 1px solid var(--gray-100); }

.user-info {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; margin-bottom: 8px;
}
.user-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.user-details strong { display: block; font-size: 0.85rem; }
.user-details span { font-size: 0.75rem; color: var(--gray-400); }

.logout-btn { color: var(--red-500) !important; }
.logout-btn:hover { background: var(--red-50) !important; }

/* Main Content */
.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    padding: 0;
}

/* Topbar */
.topbar {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 32px;
    background: #fff; border-bottom: 1px solid var(--gray-100);
    position: sticky; top: 0; z-index: 50;
}
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--gray-600); }
.topbar-title { flex: 1; }
.topbar-title h2 { font-size: 1.2rem; font-weight: 700; }
.topbar-date { font-size: 0.8rem; color: var(--gray-400); }

.notif-btn {
    position: relative; background: none; border: none;
    cursor: pointer; color: var(--gray-500); padding: 8px;
    border-radius: 10px; transition: background 0.2s;
}
.notif-btn:hover { background: var(--gray-100); }
.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; background: var(--red-500);
    border-radius: 50%; border: 2px solid #fff;
}

/* Pages */
.page { display: none; padding: 28px 32px; }
.page.active { display: block; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }

.stat-card {
    background: #fff; border-radius: var(--radius-lg);
    padding: 20px; display: flex; align-items: center; gap: 16px;
    border: 1px solid var(--gray-100); transition: box-shadow 0.3s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-blue { background: var(--blue-50); color: var(--blue-600); }
.stat-orange { background: rgba(249,115,22,0.1); color: var(--orange-600); }
.stat-green { background: var(--green-50); color: var(--green-600); }
.stat-purple { background: var(--purple-50); color: var(--purple-500); }

.stat-value { display: block; font-size: 1.4rem; font-weight: 800; color: var(--gray-900); }
.stat-label { display: block; font-size: 0.8rem; color: var(--gray-500); margin-top: 2px; }

/* Cards */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.card {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100); overflow: hidden;
}

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--gray-100);
}
.card-header h3 { font-size: 0.95rem; font-weight: 700; }
.card-link { font-size: 0.8rem; color: var(--blue-600); font-weight: 500; }
.card-link:hover { text-decoration: underline; }

/* Product List (overview) */
.product-list { padding: 8px 0; }

.product-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 22px; transition: background 0.2s;
}
.product-row:hover { background: var(--gray-50); }

.product-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.product-icon.network { background: var(--blue-500); }
.product-icon.server { background: var(--orange-500); }
.product-icon.virtual { background: var(--purple-500); }
.product-icon.addon { background: var(--green-500); }

.product-info { flex: 1; }
.product-info strong { display: block; font-size: 0.85rem; }
.product-info span { font-size: 0.75rem; color: var(--gray-400); }

.product-status {
    font-size: 0.75rem; font-weight: 600; padding: 4px 10px;
    border-radius: 6px;
}
.status-active { background: var(--green-50); color: var(--green-600); }
.status-pending { background: var(--yellow-50); color: var(--yellow-600); }
.status-expired { background: var(--red-50); color: var(--red-600); }

/* Invoice List (overview) */
.invoice-list { padding: 8px 0; }

.invoice-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 22px; transition: background 0.2s;
    cursor: pointer;
}
.invoice-row:hover { background: var(--gray-50); }

.invoice-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.invoice-icon.paid { background: var(--green-50); color: var(--green-600); }
.invoice-icon.unpaid { background: var(--orange-500); background: rgba(249,115,22,0.1); color: var(--orange-600); }
.invoice-icon.overdue { background: var(--red-50); color: var(--red-600); }

.invoice-info { flex: 1; }
.invoice-info strong { display: block; font-size: 0.85rem; }
.invoice-info span { font-size: 0.75rem; color: var(--gray-400); }

.invoice-amount { text-align: right; }
.invoice-amount strong { display: block; font-size: 0.9rem; }
.invoice-amount span { font-size: 0.7rem; }

/* ========== My Products Page ========== */
.page-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.page-actions h3 { font-size: 1.1rem; font-weight: 700; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.product-card {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100); padding: 24px;
    transition: box-shadow 0.3s, transform 0.3s;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }

.product-card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 0.75rem;
}

.product-card-title { flex: 1; }
.product-card-title h4 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.product-card-title span { font-size: 0.8rem; color: var(--gray-400); }

.product-card-details { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.detail-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem;
}
.detail-row .label { color: var(--gray-500); }
.detail-row .value { font-weight: 600; color: var(--gray-800); }

.product-card-footer { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--gray-100); }

/* ========== Catalog Page ========== */
.catalog-filters, .invoice-filters {
    display: flex; gap: 8px; flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px; border-radius: 8px;
    border: 1px solid var(--gray-200); background: #fff;
    font-size: 0.8rem; font-weight: 500; color: var(--gray-600);
    cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.filter-btn:hover { border-color: var(--blue-300); color: var(--blue-600); }
.filter-btn.active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.catalog-card {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}
.catalog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.catalog-card-badge {
    padding: 10px 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.badge-network, .badge-home_network { background: var(--blue-50); color: var(--blue-600); }
.badge-business_network { background: #dbeafe; color: var(--blue-700); }

/* Dynamic category colors */
.cat-preview.blue { background: var(--blue-50); color: var(--blue-600); }
.cat-preview.blue-dark { background: #dbeafe; color: #1e40af; }
.cat-preview.orange { background: rgba(249,115,22,0.1); color: var(--orange-600); }
.cat-preview.purple { background: var(--purple-50); color: var(--purple-500); }
.cat-preview.green { background: var(--green-50); color: var(--green-600); }
.cat-preview.red { background: var(--red-50); color: var(--red-600); }
.cat-preview.yellow { background: var(--yellow-50); color: var(--yellow-600); }
.cat-preview.pink { background: #fdf2f8; color: #db2777; }
.cat-preview.teal { background: #f0fdfa; color: #0d9488; }
.cat-preview.cyan { background: #ecfeff; color: #0891b2; }
.cat-preview.gray { background: var(--gray-100); color: var(--gray-500); }
.badge-server { background: rgba(249,115,22,0.1); color: var(--orange-600); }
.badge-virtualization { background: var(--purple-50); color: var(--purple-500); }
.badge-addon { background: var(--green-50); color: var(--green-600); }

.catalog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.catalog-card-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    min-height: 24px;
}
.catalog-card-body > p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.6;
    flex-shrink: 0;
}

.catalog-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.catalog-price .price { font-size: 1.3rem; font-weight: 800; color: var(--gray-900); }
.catalog-price .period { font-size: 0.8rem; color: var(--gray-400); }

.catalog-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
    flex: 1;
}
.catalog-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
}
.catalog-features svg { color: var(--blue-500); flex-shrink: 0; margin-top: 2px; }

.catalog-card-body .btn {
    margin-top: auto;
    padding-top: 12px;
    flex-shrink: 0;
}

.catalog-card-body .btn-full {
    margin-top: 20px;
}

/* ========== Data Table ========== */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%; border-collapse: collapse;
}
.data-table th {
    padding: 12px 20px; text-align: left;
    font-size: 0.75rem; font-weight: 600; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
.data-table td {
    padding: 14px 20px; font-size: 0.85rem;
    border-bottom: 1px solid var(--gray-100);
}
.data-table tr:hover td { background: var(--gray-50); }

.badge {
    display: inline-block; padding: 4px 10px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-paid { background: var(--green-50); color: var(--green-600); }
.badge-unpaid { background: var(--yellow-50); color: var(--yellow-600); }
.badge-overdue { background: var(--red-50); color: var(--red-600); }
.badge-processing { background: var(--blue-50); color: var(--blue-600); }

/* ========== Pending Payments ========== */
.pending-payment-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap; gap: 12px;
}
.pending-payment-item:last-child { border-bottom: none; }

.pending-info { flex: 1; min-width: 200px; }
.pending-info strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.pending-info span { font-size: 0.8rem; color: var(--gray-500); }

.pending-amount {
    font-size: 1.1rem; font-weight: 800; color: var(--gray-900);
    min-width: 140px; text-align: right;
}

.pending-action { min-width: 130px; text-align: right; }

/* ========== Modals ========== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
    background: #fff; border-radius: var(--radius-lg);
    width: 100%; max-width: 560px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
    max-height: 90vh; overflow-y: auto;
}
.modal.modal-xl { max-width: 960px; }

/* ===== MikroTik monitor dashboard (friendly UI) ===== */

/* Status banner */
.mt-status-banner { border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mt-status-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.mt-status-text { flex: 1; min-width: 200px; }
.mt-status-label { font-weight: 700; font-size: 1rem; }
.mt-status-desc { font-size: 0.8rem; color: #4b5563; margin-top: 2px; }
.mt-status-uptime { text-align: right; font-size: 0.72rem; color: #6b7280; white-space: nowrap; padding: 0 6px; border-right: 1px solid rgba(0,0,0,0.08); margin-right: 4px; }
.mt-status-uptime-val { font-weight: 700; color: #111827; font-size: 0.85rem; margin-top: 2px; }
.mt-reboot-btn { background: #fff; border: 1px solid #fca5a5; color: #dc2626; font-weight: 600; font-size: 0.82rem; padding: 8px 14px; border-radius: 10px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; transition: all 0.15s; white-space: nowrap; }
.mt-reboot-btn:hover { background: #fef2f2; border-color: #ef4444; transform: translateY(-1px); }
.mt-reboot-btn:active { transform: translateY(0); }

/* Metric cards top row */
.mt-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.mt-metric-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; align-items: center; }
.mt-metric-head { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mt-metric-title { font-size: 0.82rem; font-weight: 700; color: #374151; }
.mt-metric-badge { font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.2px; }
.mt-metric-hint { font-size: 0.72rem; color: #6b7280; margin-top: 10px; text-align: center; line-height: 1.4; }
.mt-metric-card-clients { align-items: flex-start; }
.mt-big-number { font-size: 2.6rem; font-weight: 800; color: #111827; line-height: 1; margin: 8px 0 10px; align-self: center; }
.mt-clients-breakdown { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: #374151; align-self: center; }
.mt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.mt-dot.dot-blue { background: #3b82f6; }
.mt-dot.dot-green { background: #22c55e; }

/* Gauge */
.mt-gauge { position: relative; width: 110px; height: 110px; }
.mt-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.mt-gauge-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #111827; line-height: 1; }
.mt-gauge-num { font-size: 1.8rem; line-height: 1; }
.mt-gauge-unit { font-size: 0.85rem; font-weight: 700; color: #6b7280; margin-left: 2px; line-height: 1; align-self: center; }

/* Traffic box (light theme) */
.mt-traffic-box { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.mt-traffic-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mt-traffic-title { font-size: 1rem; font-weight: 700; color: #111827; }
.mt-traffic-sub { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
.mt-iface-picker { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: #374151; }
.mt-iface-picker select { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 6px 10px; font-size: 0.82rem; color: #111827; font-family: inherit; cursor: pointer; min-width: 180px; }
.mt-bps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.mt-bps-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; text-align: center; }
.mt-bps-card.download { border-left: 4px solid #22c55e; }
.mt-bps-card.upload { border-left: 4px solid #3b82f6; }
.mt-bps-label { font-size: 0.72rem; color: #6b7280; font-weight: 600; letter-spacing: 0.3px; }
.mt-bps-value { font-size: 1.5rem; font-weight: 800; color: #111827; margin-top: 4px; }
.mt-chart { width: 100%; height: 180px; display: block; background: #fff; border-radius: 10px; border: 1px solid #e5e7eb; }
.mt-traffic-legend { display: flex; align-items: center; gap: 16px; margin-top: 10px; font-size: 0.78rem; color: #374151; }
.mt-traffic-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.mt-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-left: auto; animation: mtPulse 1.6s ease-in-out infinite; }

/* Section title */
.mt-section-title { font-size: 0.82rem; font-weight: 700; color: #374151; margin: 20px 0 10px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Interface cards */
.mt-iface-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mt-iface-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; }
.mt-iface-card.up { border-left: 3px solid #22c55e; }
.mt-iface-card.down { border-left: 3px solid #d1d5db; background: #f9fafb; }
.mt-iface-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mt-iface-name-wrap { display: flex; gap: 8px; align-items: flex-start; flex: 1; min-width: 0; }
.mt-iface-dot { width: 9px; height: 9px; border-radius: 50%; background: #d1d5db; margin-top: 6px; flex-shrink: 0; }
.mt-iface-card.up .mt-iface-dot { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.mt-iface-friendly { font-size: 0.88rem; font-weight: 700; color: #111827; }
.mt-iface-raw { font-size: 0.7rem; color: #9ca3af; font-family: 'SF Mono', Consolas, monospace; }
.mt-iface-status { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.mt-iface-card.up .mt-iface-status { background: #dcfce7; color: #166534; }
.mt-iface-card.down .mt-iface-status { background: #f3f4f6; color: #6b7280; }
.mt-iface-speeds { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.8rem; color: #374151; font-weight: 600; }

/* Advanced section */
.mt-advanced { margin-top: 22px; border-top: 1px solid #e5e7eb; padding-top: 16px; }
.mt-advanced summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: #6b7280; padding: 6px 0; }
.mt-advanced summary:hover { color: #111827; }
.mt-advanced-body { margin-top: 12px; }
.mt-advanced-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; background: #f9fafb; border-radius: 10px; padding: 14px; font-size: 0.82rem; color: #374151; }
.mt-advanced-info strong { color: #111827; }

@media (max-width: 720px) {
    .mt-metrics-grid { grid-template-columns: 1fr; }
    .mt-bps-row { grid-template-columns: 1fr; }
    .mt-iface-picker select { min-width: 140px; }
    .mt-status-uptime { border-right: none; padding: 0; margin: 0; text-align: left; }
    .mt-reboot-btn { width: 100%; justify-content: center; margin-top: 4px; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes mtPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }

/* Payment method picker */
.pay-section-label { font-size: 0.72rem; color: #6b7280; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.pay-methods-list { display: flex; flex-direction: column; gap: 8px; }
.pay-method-btn { width: 100%; text-align: left; padding: 12px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; font-family: inherit; transition: all 0.15s; }
.pay-method-btn:hover { border-color: #3b82f6; background: #f9fafb; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pay-method-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pay-method-text { flex: 1; min-width: 0; }
.pay-method-title { font-weight: 700; color: #111827; font-size: 0.92rem; }
.pay-method-desc { font-size: 0.76rem; color: #6b7280; margin-top: 2px; font-weight: 400; }

@keyframes modalIn {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: var(--gray-400); line-height: 1;
}
.modal-close:hover { color: var(--gray-700); }

.modal-body { padding: 24px; }

/* Invoice Detail Modal */
.invoice-detail-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-100);
}
.invoice-detail-header h4 { font-size: 1.2rem; font-weight: 700; }
.invoice-detail-header .inv-date { font-size: 0.8rem; color: var(--gray-400); margin-top: 4px; }

.invoice-items { margin-bottom: 20px; }
.invoice-items table { width: 100%; border-collapse: collapse; }
.invoice-items th {
    padding: 8px 0; text-align: left; font-size: 0.75rem;
    color: var(--gray-500); text-transform: uppercase;
    border-bottom: 1px solid var(--gray-200);
}
.invoice-items td { padding: 10px 0; font-size: 0.85rem; border-bottom: 1px solid var(--gray-100); }
.invoice-items .text-right { text-align: right; }

.invoice-total {
    display: flex; justify-content: flex-end; gap: 40px;
    padding: 16px 0; border-top: 2px solid var(--gray-200);
    font-size: 1.1rem; font-weight: 700;
}

/* Payment Modal */
.payment-summary {
    background: var(--gray-50); border-radius: var(--radius);
    padding: 18px; margin-bottom: 24px;
}
.payment-summary-row {
    display: flex; justify-content: space-between;
    font-size: 0.9rem; margin-bottom: 8px;
}
.payment-summary-row:last-child { margin-bottom: 0; font-weight: 700; font-size: 1rem; padding-top: 10px; border-top: 1px solid var(--gray-200); }

.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.payment-methods label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; display: block; }

.method-option {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border: 2px solid var(--gray-200);
    border-radius: var(--radius); cursor: pointer; transition: all 0.2s;
}
.method-option:hover { border-color: var(--blue-300); }
.method-option.selected { border-color: var(--blue-500); background: var(--blue-50); }
.method-option input[type="radio"] { display: none; }
.method-option .method-name { font-weight: 600; font-size: 0.9rem; }
.method-option .method-desc { font-size: 0.75rem; color: var(--gray-500); }

/* Add Product Modal */
.add-product-summary {
    display: flex; align-items: center; gap: 16px;
    background: var(--gray-50); padding: 18px; border-radius: var(--radius);
    margin-bottom: 20px;
}
.add-product-summary h4 { font-size: 1rem; font-weight: 700; }
.add-product-summary p { font-size: 0.8rem; color: var(--gray-500); }
.add-product-summary .add-price { font-size: 1.2rem; font-weight: 800; color: var(--blue-600); margin-top: 4px; }

.add-product-form .form-group { margin-bottom: 16px; }
.add-product-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.add-product-form input,
.add-product-form select,
.add-product-form textarea {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--gray-200); border-radius: 8px;
    font-family: inherit; font-size: 0.9rem; background: #fff;
}
.add-product-form input:focus,
.add-product-form select:focus,
.add-product-form textarea:focus {
    outline: none; border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

/* ========== Monitoring ========== */
.monitor-summary {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px;
}
.monitor-stat {
    background: #fff; border-radius: var(--radius-lg); padding: 18px 20px;
    border: 1px solid var(--gray-100); display: flex; align-items: center; gap: 14px;
}
.monitor-stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 1.2rem;
}
.monitor-stat-icon.up { background: var(--green-50); color: var(--green-600); }
.monitor-stat-icon.down { background: var(--red-50); color: var(--red-600); }
.monitor-stat-icon.total { background: var(--blue-50); color: var(--blue-600); }
.monitor-stat .stat-value { font-size: 1.4rem; font-weight: 800; }
.monitor-stat .stat-label { font-size: 0.78rem; color: var(--gray-500); }

.monitor-card {
    background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-100);
    padding: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px;
    cursor: pointer; transition: box-shadow 0.3s, transform 0.2s;
}
.monitor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.monitor-dot {
    width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}
.monitor-dot.up { background: var(--green-500); box-shadow: 0 0 8px rgba(34,197,94,.4); }
.monitor-dot.down { background: var(--red-500); box-shadow: 0 0 8px rgba(239,68,68,.4); animation: pulse-dot-down 1s ease-in-out infinite; }
.monitor-dot.unknown { background: var(--gray-300); animation: none; }

@keyframes pulse-dot { 0%,100%{opacity:.7;transform:scale(1)} 50%{opacity:1;transform:scale(1.2)} }
@keyframes pulse-dot-down { 0%,100%{opacity:.6;transform:scale(1)} 50%{opacity:1;transform:scale(1.3)} }

.monitor-info { flex: 1; }
.monitor-info h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.monitor-info span { font-size: 0.8rem; color: var(--gray-500); }

.monitor-stats-right { text-align: right; }
.monitor-stats-right .uptime { font-size: 1.1rem; font-weight: 800; }
.monitor-stats-right .uptime.good { color: var(--green-600); }
.monitor-stats-right .uptime.warn { color: var(--yellow-600); }
.monitor-stats-right .uptime.bad { color: var(--red-600); }
.monitor-stats-right .last-check { font-size: 0.75rem; color: var(--gray-400); }

/* Monitor Detail */
.monitor-detail-header {
    background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-100);
    padding: 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 20px;
}
.monitor-detail-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.monitor-detail-dot.up { background: var(--green-500); box-shadow: 0 0 12px rgba(34,197,94,.4); }
.monitor-detail-dot.down { background: var(--red-500); box-shadow: 0 0 12px rgba(239,68,68,.4); }

.monitor-detail-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.monitor-detail-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.82rem; color: var(--gray-500); }

.uptime-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.uptime-day {
    background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-100);
    padding: 14px; text-align: center;
}
.uptime-day .date { font-size: 0.75rem; color: var(--gray-500); margin-bottom: 4px; }
.uptime-day .pct { font-size: 1.2rem; font-weight: 800; }
.uptime-day .avg { font-size: 0.7rem; color: var(--gray-400); margin-top: 2px; }

.ping-history {
    display: flex; gap: 3px; flex-wrap: wrap; padding: 16px 20px;
}
.ping-bar {
    width: 8px; height: 28px; border-radius: 3px; transition: transform 0.2s;
}
.ping-bar:hover { transform: scaleY(1.3); }
.ping-bar.up { background: var(--green-500); }
.ping-bar.down { background: var(--red-500); }

@media (max-width: 768px) {
    .monitor-summary { grid-template-columns: 1fr; }
    .monitor-card { flex-wrap: wrap; }
}

/* ========== Ticket Form ========== */
#ticketModalBody .ticket-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#ticketModalBody .tk-form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

#ticketModalBody .tk-form-group label {
    display: block !important;
    width: 100% !important;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

#ticketModalBody .tk-form-group input,
#ticketModalBody .tk-form-group select,
#ticketModalBody .tk-form-group textarea {
    display: block !important;
    width: 100% !important;
    padding: 11px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--gray-50);
    color: var(--gray-800);
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

#ticketModalBody .tk-form-group select {
    background: var(--gray-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

#ticketModalBody .tk-form-group input:focus,
#ticketModalBody .tk-form-group select:focus,
#ticketModalBody .tk-form-group textarea:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
}

#ticketModalBody .tk-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

#ticketModalBody .tk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

#ticketModalBody .ticket-form .btn-full {
    margin-top: 6px;
}

@media (max-width: 480px) {
    #ticketModalBody .tk-form-row {
        grid-template-columns: 1fr;
    }
}

/* ========== Tickets ========== */
.ticket-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.ticket-card {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100); padding: 20px;
    margin-bottom: 12px; transition: box-shadow 0.3s, transform 0.2s;
    cursor: pointer;
}
.ticket-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.ticket-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.ticket-card-header h4 { font-size: 0.95rem; font-weight: 700; flex: 1; }

.ticket-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--gray-500); }
.ticket-meta span { display: flex; align-items: center; gap: 4px; }

.ticket-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge-open { background: var(--blue-50); color: var(--blue-600); }
.badge-in_progress { background: rgba(249,115,22,0.1); color: var(--orange-600); }
.badge-waiting_reply { background: var(--yellow-50); color: var(--yellow-600); }
.badge-resolved { background: var(--green-50); color: var(--green-600); }
.badge-closed { background: var(--gray-100); color: var(--gray-500); }

.badge-low { background: var(--gray-100); color: var(--gray-600); }
.badge-medium { background: var(--blue-50); color: var(--blue-600); }
.badge-high { background: rgba(249,115,22,0.1); color: var(--orange-600); }
.badge-critical { background: var(--red-50); color: var(--red-600); }

/* Ticket Detail */
.ticket-detail-header {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100); padding: 24px; margin-bottom: 20px;
}
.ticket-detail-header h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.ticket-detail-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.82rem; color: var(--gray-500); }
.ticket-detail-meta .meta-item { display: flex; align-items: center; gap: 6px; }
.ticket-detail-meta .meta-item strong { color: var(--gray-700); }

.ticket-conversation {
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100); overflow: hidden;
}
.ticket-conv-header {
    padding: 16px 22px; border-bottom: 1px solid var(--gray-100);
    font-weight: 700; font-size: 0.9rem;
}

.ticket-messages { padding: 20px; display: flex; flex-direction: column; gap: 16px; max-height: 500px; overflow-y: auto; }

.ticket-msg {
    display: flex; gap: 12px; align-items: flex-start;
}
.ticket-msg.admin { flex-direction: row-reverse; }

.ticket-msg-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ticket-msg:not(.admin) .ticket-msg-avatar { background: var(--blue-500); }
.ticket-msg.admin .ticket-msg-avatar { background: var(--orange-500); }

.ticket-msg-bubble {
    flex: 1; max-width: 75%;
    padding: 14px 18px; border-radius: 14px;
    font-size: 0.88rem; line-height: 1.6;
}
.ticket-msg:not(.admin) .ticket-msg-bubble {
    background: var(--gray-50); border-top-left-radius: 4px;
}
.ticket-msg.admin .ticket-msg-bubble {
    background: var(--blue-50); border-top-right-radius: 4px;
}

.ticket-msg-info {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px; font-size: 0.75rem;
}
.ticket-msg-info .name { font-weight: 700; color: var(--gray-800); }
.ticket-msg-info .time { color: var(--gray-400); }
.ticket-msg.admin .ticket-msg-info { flex-direction: row-reverse; }

.ticket-msg-text { color: var(--gray-700); white-space: pre-wrap; word-break: break-word; }

.ticket-reply-form {
    display: flex; gap: 10px; padding: 16px 22px;
    border-top: 1px solid var(--gray-100); background: var(--gray-50);
}
.ticket-reply-form textarea {
    flex: 1; padding: 12px 16px; border: 1px solid var(--gray-200);
    border-radius: 12px; font-family: inherit; font-size: 0.88rem;
    resize: none; min-height: 48px; background: #fff;
}
.ticket-reply-form textarea:focus {
    outline: none; border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.ticket-reply-form button {
    align-self: flex-end; padding: 10px 20px;
}

.ticket-actions {
    display: flex; gap: 8px; margin-top: 16px;
    padding: 16px 22px; border-top: 1px solid var(--gray-100);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .login-wrapper { grid-template-columns: 1fr; }
    .login-left { display: none; }
    .login-right { padding: 24px; }
    .form-row { grid-template-columns: 1fr; }

    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .sidebar-close { display: block; }
    .menu-toggle { display: block; }

    .main-content { margin-left: 0; }
    .page { padding: 20px 16px; }
    .topbar { padding: 12px 16px; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .products-grid, .catalog-grid { grid-template-columns: 1fr; }

    .page-actions { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .pending-payment-item { flex-direction: column; align-items: flex-start; }
    .pending-amount, .pending-action { text-align: left; }
}
