/* ==================================================================
   Nexum WHMCS Theme — Pages CSS
   Layouts for Dashboard, Services, Domains, Invoices, Tickets, Auth
   ================================================================== */

/* ---------- Auth Screens (Login, Register, PW Reset) ---------- */
/* ---------- Auth Screens (Login, Register, PW Reset) ---------- */
.nx-auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: var(--nx-bg, #f6f8fb);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nx-auth-box {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.nx-auth-box-lg {
    max-width: 560px !important;
}

.nx-auth-card {
    background: #ffffff !important;
    border: 1px solid #e5eaf2 !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04) !important;
    padding: 36px 32px !important;
    width: 100%;
}

.nx-auth-brand {
    text-align: center;
    margin-bottom: 22px;
}

.nx-auth-brand img {
    max-height: 38px;
    width: auto;
}

.nx-auth-head {
    margin-bottom: 24px;
    text-align: center;
}

.nx-auth-title {
    font-size: 22px;
    font-weight: 800;
    color: #172033;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.nx-auth-sub {
    color: #64748b;
    font-size: 13.5px;
    margin-bottom: 0;
    line-height: 1.5;
}

.nx-auth-field {
    margin-bottom: 16px;
}

.nx-auth-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
}

.nx-auth-input {
    height: 48px !important;
    border-radius: 10px !important;
    border: 1px solid #dbe3ef !important;
    background-color: #ffffff !important;
    font-size: 13.5px !important;
    color: #172033 !important;
    padding: 10px 14px !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
}

.nx-auth-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10) !important;
    outline: none !important;
}

.nx-input-reveal {
    position: relative;
    display: flex;
    width: 100%;
}

.nx-input-reveal input {
    padding-right: 42px !important;
}

.nx-reveal-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: transparent;
    border: none;
    padding: 0 14px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.nx-reveal-btn:hover {
    color: #2563eb;
}

.nx-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 22px;
    font-size: 13px;
}

.nx-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #172033;
    cursor: pointer;
    user-select: none;
}

.nx-auth-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #dbe3ef;
    cursor: pointer;
    accent-color: #2563eb;
}

.nx-auth-link {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.nx-auth-link:hover {
    color: #1d4ed8;
    text-decoration: underline !important;
}

.nx-auth-btn {
    width: 100%;
    height: 48px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease !important;
    cursor: pointer;
    text-decoration: none !important;
}

.nx-auth-btn:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
    color: #ffffff !important;
}

.nx-auth-foot {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.nx-auth-copy {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #94a3b8;
}

/* ---------- Dashboard (clientareahome.tpl) ---------- */
.nx-dash-welcome {
    background: var(--nx-card-bg);
    border: var(--nx-border-width) solid var(--nx-border);
    border-radius: var(--nx-radius-card);
    padding: var(--nx-card-padding);
    margin-bottom: var(--nx-card-gap);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--nx-space-4);
}

.nx-welcome-title {
    font-size: 22px;
    font-weight: var(--nx-weight-heading);
    margin-bottom: var(--nx-space-1);
}

.nx-welcome-subtitle {
    color: var(--nx-muted);
    font-size: var(--nx-font-size-sm);
    margin-bottom: 0;
}

.nx-quick-actions {
    display: flex;
    gap: var(--nx-space-2);
    flex-wrap: wrap;
}

.nx-dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--nx-card-gap);
}

/* ---------- Product / Service Details (clientareaproductdetails.tpl) ---------- */
.nx-service-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--nx-space-4);
    padding-bottom: var(--nx-space-5);
    border-bottom: var(--nx-border-width) solid var(--nx-border);
    margin-bottom: var(--nx-space-5);
}

.nx-service-title {
    font-size: 24px;
    font-weight: var(--nx-weight-heading);
    margin-bottom: var(--nx-space-1);
}

.nx-service-domain {
    font-size: var(--nx-font-size-md);
    color: var(--nx-primary);
}

.nx-info-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--nx-space-4);
    margin-bottom: var(--nx-space-5);
}

.nx-info-item {
    background: rgba(var(--nx-primary-rgb), 0.03);
    border: var(--nx-border-width) solid var(--nx-border);
    border-radius: var(--nx-radius-md);
    padding: var(--nx-space-4);
}

.nx-info-label {
    font-size: var(--nx-font-size-xs);
    font-weight: var(--nx-weight-medium);
    color: var(--nx-muted);
    text-transform: uppercase;
    margin-bottom: var(--nx-space-1);
}

.nx-info-val {
    font-size: var(--nx-font-size-lg);
    font-weight: var(--nx-weight-heading);
    color: var(--nx-text);
}

/* ---------- Support Tickets (viewticket.tpl) ---------- */
.nx-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: var(--nx-space-4);
    margin-bottom: var(--nx-space-6);
}

.nx-ticket-msg {
    border-radius: var(--nx-radius-card);
    border: var(--nx-border-width) solid var(--nx-border);
    background: var(--nx-card-bg);
    overflow: hidden;
}

.nx-ticket-msg-staff {
    border-color: rgba(var(--nx-primary-rgb), 0.3);
    background: rgba(var(--nx-primary-rgb), 0.02);
}

.nx-ticket-msg-head {
    padding: 14px 20px;
    background: rgba(var(--nx-primary-rgb), 0.03);
    border-bottom: var(--nx-border-width) solid var(--nx-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nx-ticket-msg-author {
    font-weight: var(--nx-weight-heading);
    font-size: var(--nx-font-size);
}

.nx-ticket-msg-date {
    font-size: var(--nx-font-size-xs);
    color: var(--nx-muted);
}

.nx-ticket-msg-body {
    padding: 20px;
    line-height: 1.7;
}

/* ---------- MS Telecom Modern SaaS Invoice (viewinvoice.tpl) ---------- */
/* ---------- MS Telecom Modern SaaS Invoice (viewinvoice.tpl) ---------- */
.mst-invoice-page {
    background: var(--mst-background, #f8fafc);
    min-height: 100vh;
    padding-bottom: 80px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--mst-text, #0f172a);
}

.mst-invoice-wrapper {
    max-width: 1120px;
    margin: 32px auto 0;
    padding: 0 20px;
}

.mst-back-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--mst-text-secondary, #64748b);
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.mst-back-link:hover {
    color: var(--mst-primary, #2563eb);
}

.mst-card-label-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mst-text-secondary, #64748b);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mst-invoice-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.mst-invoice-card {
    background: #ffffff !important;
    border: 1px solid var(--mst-border, #e2e8f0) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
}

/* Status Badges */
.mst-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mst-status-paid {
    background: #dcfce7 !important;
    color: #16a34a !important;
    border: 1px solid #bbf7d0 !important;
}

.mst-status-unpaid {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
}

.mst-status-overdue {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fca5a5 !important;
}

.mst-status-cancelled {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.mst-status-refunded {
    background: #ede9fe !important;
    color: #7c3aed !important;
    border: 1px solid #ddd6fe !important;
}

.mst-status-collections {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}

/* 2-Column Responsive Grid */
.mst-invoice-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .mst-invoice-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
    .mst-invoice-grid-2 > .mst-invoice-card {
        height: 100%;
        min-height: 150px;
        margin-bottom: 0 !important;
    }
}

/* Table Styling */
.mst-invoice-table {
    width: 100%;
    margin-bottom: 0;
}

.mst-invoice-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mst-invoice-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.mst-invoice-table tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.mst-btn-primary {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 11px !important;
    font-weight: 700 !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer;
}

.mst-btn-primary:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    color: #ffffff !important;
}

.mst-btn-secondary {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 11px !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer;
}

.mst-btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Print Optimization */
@media print {
    body, .mst-invoice-page {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
    }
    header.nx-topbar,
    .mst-invoice-actions,
    .mst-btn-back,
    .nx-mobile-drawer,
    .nx-mobile-backdrop,
    .mst-invoice-topbar,
    .mst-payment-form-box {
        display: none !important;
    }
    .mst-invoice-wrapper {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .mst-invoice-card {
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        border-radius: 8px !important;
        page-break-inside: avoid;
        margin-bottom: 16px !important;
        padding: 16px 20px !important;
    }
}

/* ---------- Account Details Polish (clientareadetails.tpl) ---------- */
.mst-details-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03) !important;
    overflow: hidden;
    margin-bottom: 20px;
    height: 100%;
}

.mst-details-card-header {
    padding: 14px 20px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mst-details-icon-chip {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.mst-chip-blue {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.mst-chip-green {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

.mst-chip-cyan {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #e0f2fe;
}

.mst-chip-amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.mst-details-title {
    font-size: 15px;
    font-weight: 700;
    color: #172033;
    margin: 0;
}

.mst-details-card-body {
    padding: 20px 22px !important;
}

.mst-form-group {
    margin-bottom: 12px;
}

.mst-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    display: block;
}

.mst-form-group .form-control,
.mst-form-group .custom-select,
.mst-form-group select,
.mst-form-group input {
    height: 40px !important;
    border-radius: 10px !important;
    border: 1px solid #dbe3ef !important;
    background-color: #ffffff !important;
    font-size: 13px !important;
    color: #172033 !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
}

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

/* Email Notification Preferences */
.mst-email-pref-item {
    margin-bottom: 12px;
}

.mst-email-pref-label {
    font-size: 13px;
    font-weight: 600;
    color: #172033;
    cursor: pointer;
    line-height: 1.5;
}

/* Buttons */
.mst-btn-save {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 11px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    height: 40px !important;
    padding: 0 20px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease !important;
    cursor: pointer;
}

.mst-btn-save:hover {
    background: #1d4ed8 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
    color: #ffffff !important;
}

.mst-btn-cancel {
    background: #ffffff !important;
    color: #172033 !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 11px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    height: 40px !important;
    padding: 0 18px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer;
}

.mst-btn-cancel:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #172033 !important;
}
