/**
 * Litaport Core Admin Panel Styles
 * Design consistent with client panel
 */

/* CSS Variables */
:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-light: rgba(16, 185, 129, 0.1);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.1);
    --info: #3B82F6;
    --info-light: rgba(59, 130, 246, 0.1);
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.1);
    
    --text: #1a1a2e;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --bg: #f8fafc;
    --bg-dark: #f1f5f9;
    --white: #ffffff;
    --border: #e5e7eb;
    --border-dark: #d1d5db;
    
    --sidebar-width: 260px;
    --header-height: 64px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.core-layout {
    display: flex;
    min-height: 100vh;
}

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

.core-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.core-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
}

.core-logo svg {
    color: var(--primary);
}

/* Navigation */
.core-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.core-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: all var(--transition);
}

.core-nav-item:hover {
    background: var(--bg);
    color: var(--text);
}

.core-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.core-nav-item svg {
    flex-shrink: 0;
}

.core-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 16px;
}

/* Sidebar Footer */
.core-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.core-admin-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.core-admin-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.core-admin-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.core-admin-name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.core-admin-role {
    font-size: 11px;
    color: var(--text-muted);
}

.core-logout-form { margin: 0; }

.core-logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.core-logout-btn:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

/* Main Content */
.core-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.core-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.core-sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
}

.core-page-title {
    font-size: 18px;
    font-weight: 600;
}

/* Content */
.core-content {
    flex: 1;
    padding: 24px;
}

/* Alerts */
.core-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.core-alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.core-alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.core-alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

/* Search */
.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    width: 280px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-secondary {
    background: var(--bg-dark);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Table */
.table-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

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

.data-table tr:hover td {
    background: var(--bg);
}

.table-empty {
    text-align: center !important;
    padding: 48px 16px !important;
    color: var(--text-muted);
}

.table-empty svg {
    margin: 0 auto 12px auto;
    display: block;
    opacity: 0.5;
}

.table-empty p {
    margin: 0;
    text-align: center;
}

/* User Cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 100px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-outline-success {
    background: transparent;
    border: 1px solid var(--success);
    color: var(--success);
    padding: 3px 8px;
}

.badge-outline-warning {
    background: transparent;
    border: 1px solid var(--warning);
    color: var(--warning);
    padding: 3px 8px;
}

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

/* Table Actions */
.table-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}

.action-btn-success:hover {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-light);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

/* Modal - Old styles for modal-overlay pattern */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay .modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.modal-overlay .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-overlay .modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-overlay .modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-overlay .modal-close:hover {
    color: var(--text);
}

.modal-overlay .modal-body {
    padding: 20px;
}

.modal-overlay .modal-body p {
    margin: 0 0 8px 0;
}

.modal-overlay .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color var(--transition);
    background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

.form-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
}

.form-hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
}

/* Card */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.stat-card-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-card-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Text utilities */
.text-muted {
    color: var(--text-muted);
}

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-logo svg {
    color: var(--primary);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.auth-error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* Spinner */
.spinner {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loader .spinner {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    .core-sidebar {
        transform: translateX(-100%);
    }
    
    .core-sidebar.open {
        transform: translateX(0);
    }
    
    .core-main {
        margin-left: 0;
    }
    
    .core-sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon-success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon-info {
    background: var(--info-light);
    color: var(--info);
}

.stat-icon-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Dashboard Welcome */
.dashboard-welcome {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.dashboard-welcome h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    color: var(--text-secondary);
    margin: 0;
}


/* Form Card */
.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 600px;
}

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

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

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked + .checkbox-custom::after {
    display: block;
}

/* Detail Card */
.detail-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-width: 0;
}

.detail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.detail-card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.detail-card-body {
    padding: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row:first-child {
    padding-top: 0;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.detail-header-info {
    flex: 1;
}

.detail-header-info h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-header-info p {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    align-items: start;
}

.detail-item {
    padding: 16px 24px;
    background: var(--white);
}

.detail-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--text);
}

.detail-value small {
    display: block;
    margin-top: 4px;
}

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.error-content {
    max-width: 400px;
}

.error-code {
    font-size: 96px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 16px;
}

.error-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.error-message {
    color: var(--text-muted);
    margin-bottom: 24px;
}


/* Password Toggle */
.input-with-icon {
    position: relative;
}

.input-with-icon .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}

.password-toggle:hover {
    color: var(--text);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}


/* ==========================================
   Toast Notifications
   ========================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--info);
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: var(--success);
}
.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}
.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}
.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}
.toast-info .toast-icon {
    color: var(--info);
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text);
}

/* ==========================================
   Confirm Modal
   ========================================== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding: 20px;
}

.confirm-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s ease;
    margin: auto;
}

.confirm-modal-overlay.show .confirm-modal {
    transform: scale(1);
}

.confirm-modal-icon {
    margin-bottom: 16px;
}

.confirm-modal-icon-warning {
    color: var(--warning);
}

.confirm-modal-icon-danger {
    color: var(--danger);
}

.confirm-modal-icon-info {
    color: var(--info);
}

.confirm-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.confirm-modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.confirm-modal-actions .btn {
    min-width: 120px;
    flex: 1;
    max-width: 150px;
    justify-content: center;
    text-align: center;
}

/* ==========================================
   Skeleton Loader
   ========================================== */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-dark) 0px, #e8ecf1 40px, var(--bg-dark) 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-text-sm {
    height: 12px;
    width: 60%;
}

.skeleton-text-lg {
    height: 18px;
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-avatar-lg {
    width: 64px;
    height: 64px;
}

.skeleton-badge {
    width: 60px;
    height: 24px;
    border-radius: 100px;
}

.skeleton-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
}

/* Skeleton Table Row */
.skeleton-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.skeleton-row:last-child {
    border-bottom: none;
}

.skeleton-cell {
    flex: 1;
    padding: 0 8px;
}

.skeleton-cell:first-child {
    padding-left: 0;
}

.skeleton-cell:last-child {
    padding-right: 0;
}

.skeleton-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Skeleton Stat Card */
.skeleton-stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.skeleton-stat-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.skeleton-stat-value {
    height: 32px;
    width: 80px;
}

.skeleton-stat-label {
    height: 14px;
    width: 100px;
}

/* Skeleton Detail Card */
.skeleton-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.skeleton-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-detail-title {
    height: 20px;
    width: 200px;
}

.skeleton-detail-subtitle {
    height: 14px;
    width: 150px;
}

/* Skeleton Card Section */
.skeleton-card-section {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.skeleton-card-section:last-child {
    border-bottom: none;
}

.skeleton-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.skeleton-card-row:first-child {
    padding-top: 0;
}

.skeleton-card-row:last-child {
    padding-bottom: 0;
}

.skeleton-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.skeleton-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-card-title {
    height: 16px;
    width: 150px;
}

.skeleton-card-desc {
    height: 12px;
    width: 200px;
}

/* Page Loading State
   Skeleton is visible while the page parses; each view's own script
   (or core.js data-skeleton) hides it and reveals the content. */
.skeleton-container {
    display: block;
}

.content-container {
    display: block;
}

/* Skeleton Welcome Card */
.skeleton-welcome {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.skeleton-welcome-title {
    height: 20px;
    width: 250px;
    margin-bottom: 12px;
}

.skeleton-welcome-text {
    height: 14px;
    width: 100%;
    max-width: 500px;
}

/* Skeleton Search */
.skeleton-search {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.skeleton-search-input {
    width: 280px;
    height: 40px;
}

.skeleton-search-btn {
    width: 40px;
    height: 40px;
}

/* Skeleton Page Header */
.skeleton-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.skeleton-header-btn {
    width: 120px;
    height: 40px;
}


/* ==========================================
   Order Detail Page - Modern Design
   ========================================== */
.order-detail-page {
    max-width: none;
    margin: 0;
}

/* Support ticket management */
.support-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.support-admin-stat { display: flex; align-items: center; gap: 13px; min-height: 96px; padding: 18px 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 4px 16px rgba(15,23,42,.035); }
.support-admin-stat-icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 11px; }.support-admin-stat-icon.green { color: #059669; background: #d1fae5; }.support-admin-stat-icon.blue { color: #2563eb; background: #dbeafe; }.support-admin-stat-icon.amber { color: #d97706; background: #fef3c7; }.support-admin-stat-icon.slate { color: #475569; background: #e2e8f0; }
.support-admin-stat div { display: flex; flex-direction: column; gap: 3px; }.support-admin-stat strong { color: #0f172a; font-size: 23px; line-height: 1; }.support-admin-stat span:last-child { color: #64748b; font-size: 11px; font-weight: 600; }
.support-admin-filter { padding: 14px 16px; margin-bottom: 16px; background: #fff; border: 1px solid #e2e8f0; border-radius: 13px; }
.support-admin-filter form { display: flex; align-items: center; gap: 10px; }.support-admin-filter .form-select { width: 180px; min-height: 40px; }
.support-admin-search { display: flex; align-items: center; min-width: 260px; max-width: 420px; flex: 1; padding: 0 12px; border: 1px solid #dbe3ec; border-radius: 8px; color: #94a3b8; }.support-admin-search:focus-within { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.1); }
.support-admin-search input { width: 100%; height: 40px; padding: 0 0 0 9px; color: #0f172a; background: transparent; border: 0; outline: 0; font-size: 12px; }
.support-admin-total { margin-left: auto; color: #94a3b8; font-size: 12px; white-space: nowrap; }
.support-admin-table-wrap { border-radius: 14px; }.support-admin-table th { white-space: nowrap; }.support-admin-table td { vertical-align: middle; }
.support-admin-subject, .support-admin-customer { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }.support-admin-subject strong, .support-admin-customer strong { max-width: 260px; overflow: hidden; color: #0f172a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.support-admin-subject code { width: max-content; color: #059669; background: #ecfdf5; border-radius: 4px; font-size: 10px; }.support-admin-customer span { max-width: 270px; overflow: hidden; color: #94a3b8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.support-source-label { width:max-content;padding:2px 6px;border-radius:999px;font-size:8px;font-weight:700 }.support-source-label.source-customer_panel { color:#1d4ed8;background:#dbeafe }.support-source-label.source-mylitaport { color:#047857;background:#d1fae5 }
.support-admin-category, .support-admin-status, .support-admin-priority { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }.support-admin-category { padding: 5px 9px; color: #334155; background: #f1f5f9; }.support-admin-status { padding: 5px 9px; }.support-admin-priority { padding: 4px 8px; }
.support-admin-status.status-open { color: #047857; background: #d1fae5; }.support-admin-status.status-in_progress { color: #1d4ed8; background: #dbeafe; }.support-admin-status.status-waiting_customer { color: #b45309; background: #fef3c7; }.support-admin-status.status-resolved { color: #047857; background: #ccfbf1; }.support-admin-status.status-closed { color: #64748b; background: #e2e8f0; }
.support-admin-priority.priority-low { color: #64748b; background: #f1f5f9; }.support-admin-priority.priority-normal { color: #0369a1; background: #e0f2fe; }.support-admin-priority.priority-high { color: #b45309; background: #fef3c7; }.support-admin-priority.priority-urgent { color: #b91c1c; background: #fee2e2; }
.support-admin-table td > small { display: block; margin-top: 3px; color: #94a3b8; font-size: 10px; }.support-admin-open { display: grid; width: 32px; height: 32px; place-items: center; color: #64748b; border: 1px solid #e2e8f0; border-radius: 8px; }.support-admin-open:hover { color: #059669; border-color: #a7f3d0; background: #ecfdf5; }
.support-core-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid #e2e8f0; }.support-core-detail-title { display: flex; align-items: center; gap: 18px; }.support-core-back { display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 11px; font-weight: 600; }.support-core-detail-title code { color: #059669; font-size: 11px; }.support-core-detail-title h2 { margin: 4px 0 0; color: #0f172a; font-size: 20px; }
.support-core-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 20px; }.support-core-thread-card, .support-core-info-card { overflow: hidden; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 4px 18px rgba(15,23,42,.03); }
.support-core-card-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }.support-core-card-head > div { display: flex; align-items: center; justify-content: space-between; width: 100%; }.support-core-card-head strong { color: #0f172a; font-size: 12px; }.support-core-card-head span { color: #94a3b8; font-size: 10px; }
.support-core-thread { display: flex; flex-direction: column; gap: 15px; max-height: 620px; padding: 20px; overflow-y: auto; background: #f8fafc; }.support-core-message { display: flex; align-items: flex-start; gap: 10px; max-width: 88%; }.support-core-message.admin { align-self: flex-end; flex-direction: row-reverse; }.support-core-message.customer { align-self: flex-start; }
.support-core-message-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: #fff; background: #64748b; border-radius: 50%; font-size: 11px; font-weight: 700; }.support-core-message.admin .support-core-message-avatar { background: #10b981; }
.support-core-message-body { min-width: 210px; padding: 13px 15px; background: #fff; border: 1px solid #e2e8f0; border-radius: 13px; }.support-core-message.admin .support-core-message-body { background: #ecfdf5; border-color: #a7f3d0; }.support-core-message-body > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 7px; }.support-core-message-body strong { color: #0f172a; font-size: 11px; }.support-core-message-body time { color: #94a3b8; font-size: 9px; white-space: nowrap; }.support-core-message-body p { margin: 0; color: #475569; font-size: 12px; line-height: 1.6; word-break: break-word; }
.support-core-reply { padding: 18px; border-top: 1px solid #e2e8f0; }.support-core-reply label { display: block; margin-bottom: 7px; color: #0f172a; font-size: 11px; font-weight: 700; }.support-core-reply textarea { width: 100%; min-height: 110px; padding: 12px; resize: vertical; color: #0f172a; border: 1px solid #dbe3ec; border-radius: 8px; outline: 0; font: inherit; font-size: 12px; line-height: 1.55; }.support-core-reply textarea:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.1); }.support-core-reply > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }.support-core-reply small { color: #94a3b8; font-size: 10px; }.support-core-closed { padding: 15px 18px; color: #64748b; background: #f8fafc; border-top: 1px solid #e2e8f0; font-size: 11px; }
.support-core-sidebar { display: flex; flex-direction: column; gap: 16px; }.support-core-info-card dl { margin: 0; padding: 4px 18px 14px; }.support-core-info-card dl > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }.support-core-info-card dl > div:last-child { border-bottom: 0; }.support-core-info-card dt { color: #64748b; font-size: 10px; }.support-core-info-card dd { margin: 0; color: #0f172a; font-size: 11px; font-weight: 600; text-align: right; }.support-core-info-card dd small { display: block; max-width: 190px; margin-top: 3px; overflow: hidden; color: #94a3b8; font-size: 9px; font-weight: 400; text-overflow: ellipsis; }
.support-core-status-form { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }.support-core-status-form .form-select, .support-core-status-form .btn { width: 100%; }
@media (max-width: 1100px) { .support-admin-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }.support-core-grid { grid-template-columns: 1fr; }.support-core-sidebar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) { .support-admin-filter form { align-items: stretch; flex-direction: column; }.support-admin-search { width: 100%; max-width: none; }.support-admin-filter .form-select { width: 100%; }.support-admin-total { margin-left: 0; }.support-admin-table-wrap { overflow-x: auto; }.support-admin-table { min-width: 1050px; }.support-core-sidebar { grid-template-columns: 1fr; }.support-core-detail-head, .support-core-detail-title { align-items: flex-start; flex-direction: column; }.support-core-message { max-width: 100%; }.support-core-message-avatar { display: none; } }

.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.order-detail-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.order-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.order-detail-back:hover {
    background: var(--bg-dark);
    color: var(--text);
    border-color: var(--border-dark);
}

.order-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
}

.order-detail-header-right {
    display: flex;
    gap: 10px;
}

.order-detail-header-right .btn {
    padding: 10px 20px;
    font-weight: 600;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

/* Order Cards Grid */
.order-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 1200px) {
    .order-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .order-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .order-detail-header-right {
        width: 100%;
    }
    
    .order-detail-header-right .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Order Card */
.order-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow var(--transition);
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.order-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, var(--bg), var(--white));
}

.order-card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.order-card-body {
    padding: 24px;
}

/* Info Rows */
.order-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--bg-dark);
}

.order-info-row:first-child {
    padding-top: 0;
}

.order-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-info-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.order-info-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.order-info-value.highlight {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.order-info-value.success {
    color: var(--success);
}

.order-info-value.danger {
    color: var(--danger);
}

/* Reference Code Style */
.order-ref-code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Order Badge */
.order-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-badge.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.order-badge.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.order-badge.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.order-badge.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Total Row */
.order-total-row {
    margin-top: 16px;
    padding-top: 18px !important;
    border-top: 2px solid var(--primary) !important;
    border-bottom: none !important;
    background: linear-gradient(to right, var(--primary-light), transparent);
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
    margin-bottom: -24px;
    padding-bottom: 18px !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Receipt Section */
.order-receipt-section {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--white) 100%);
}

.order-receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.order-receipt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Customer Link */
.order-customer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--white);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.order-customer-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Invoice Form */
.order-invoice-form {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.order-invoice-form .form-group {
    margin-bottom: 18px;
}

.order-invoice-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-invoice-form .form-select,
.order-invoice-form .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    background: var(--white);
}

.order-invoice-form .form-select:focus,
.order-invoice-form .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.order-invoice-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
}

.order-invoice-form .checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.order-invoice-form .btn {
    margin-top: 8px;
}

/* ==========================================
   Page Header Extended
   ========================================== */
.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   Modal Extended Styles
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-body .form-group {
    margin-bottom: 0;
}

.modal-body .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-body .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: border-color var(--transition);
}

.modal-body .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==========================================
   Button Variants Extended
   ========================================== */
.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-warning:hover {
    background: #d97706;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* ==========================================
   Detail Grid Responsive
   ========================================== */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Badge Secondary
   ========================================== */
.badge-secondary {
    background: var(--bg-dark);
    color: var(--text-secondary);
}


/* ==========================================
   Subscription Detail - Compact Layout
   ========================================== */

/* Info Grid - 2x2 or 4 column layout */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-info-item .detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.detail-value-lg {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Dates Section - Compact horizontal layout */
.detail-dates-section {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.detail-dates-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-date-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-date-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-date-item.trial {
    color: var(--info);
}

.detail-date-item.trial svg {
    color: var(--info);
}

.detail-date-item.success {
    color: var(--success);
}

.detail-date-item.success svg {
    color: var(--success);
}

.detail-date-item .days-left {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
}

/* Status Section - Cancel/Suspend info */
.detail-status-section {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-top: 0;
}

.detail-status-section.danger {
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.detail-status-section.warning {
    background: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.detail-status-section + .detail-status-section {
    margin-top: 12px;
}

.detail-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.detail-status-section.danger .detail-status-header {
    color: var(--danger);
}

.detail-status-section.warning .detail-status-header {
    color: var(--warning);
}

.detail-status-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.detail-status-content .separator {
    color: var(--text-muted);
}

.detail-status-reason {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .detail-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .detail-info-grid {
        grid-template-columns: 1fr;
    }

    .detail-dates-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==========================================
   Core navigation & inner-page shell v2
   ========================================== */

:root {
    --sidebar-width: 276px;
    --header-height: 76px;
}

.core-body {
    overflow-x: hidden;
    background: #f4f7fb;
}

.core-sidebar {
    color: #dbe7f3;
    background:
        radial-gradient(circle at 20% 0%, rgba(16, 185, 129, .13), transparent 26%),
        linear-gradient(180deg, #071f3d 0%, #061a32 100%);
    border-right: 0;
    box-shadow: 12px 0 35px rgba(3, 20, 39, .10);
}

.core-sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.core-logo {
    gap: 13px;
    min-height: 44px;
    padding: 0 8px;
    color: var(--white);
}

.core-logo img {
    width: 126px;
    height: auto;
}

.core-nav {
    padding: 14px 12px 22px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.14) transparent;
}

.core-nav-group {
    margin-bottom: 15px;
}

.core-nav-group:last-child {
    margin-bottom: 0;
}

.core-nav-label {
    display: block;
    padding: 0 13px;
    margin-bottom: 6px;
    color: rgba(255,255,255,.34);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.core-nav-item {
    position: relative;
    min-height: 42px;
    gap: 11px;
    margin-bottom: 2px;
    padding: 10px 13px;
    color: rgba(226, 235, 245, .70);
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.core-nav-item:hover {
    color: var(--white);
    background: rgba(255,255,255,.065);
    border-color: rgba(255,255,255,.045);
}

.core-nav-item.active {
    color: var(--white);
    font-weight: 650;
    background: linear-gradient(90deg, rgba(16,185,129,.22), rgba(16,185,129,.09));
    border-color: rgba(110,231,183,.16);
    box-shadow: inset 3px 0 0 #34d399;
}

.core-nav-item.active::after {
    content: '';
    position: absolute;
    right: 13px;
    width: 5px;
    height: 5px;
    background: #6ee7b7;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(110,231,183,.10);
}

.core-nav-item svg {
    width: 18px;
    height: 18px;
    color: rgba(148, 211, 194, .78);
    stroke-width: 1.8;
}

.core-nav-item.active svg,
.core-nav-item:hover svg {
    color: #6ee7b7;
}

.core-nav-divider {
    display: none;
}

.core-sidebar-footer {
    gap: 10px;
    padding: 15px 14px;
    background: rgba(0,0,0,.12);
    border-top: 1px solid rgba(255,255,255,.08);
}

.core-admin-avatar {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 7px 18px rgba(16,185,129,.20);
}

.core-admin-name { color: rgba(255,255,255,.88); }
.core-admin-role { color: rgba(255,255,255,.40); }

.core-logout-btn {
    color: rgba(255,255,255,.60);
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.10);
}

.core-logout-btn:hover {
    color: #fecaca;
    background: rgba(239,68,68,.14);
    border-color: rgba(248,113,113,.35);
}

.core-main {
    background: #f4f7fb;
}

.core-header {
    padding: 0 clamp(20px, 3vw, 38px);
    gap: 15px;
    background: rgba(255,255,255,.92);
    border-bottom-color: #e7edf4;
    box-shadow: 0 8px 24px rgba(15,23,42,.025);
    backdrop-filter: blur(14px);
}

.core-page-heading {
    min-width: 0;
}

.core-page-breadcrumb {
    display: block;
    margin-bottom: 2px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.core-page-title {
    max-width: min(70vw, 760px);
    overflow: hidden;
    color: #10233f;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.018em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.core-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 7px 11px;
    color: #456078;
    background: #f3f7fa;
    border: 1px solid #e3ebf2;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.core-context-badge i {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.core-content {
    width: 100%;
    padding: clamp(20px, 3vw, 34px);
}

/* Inner pages share the same visual surface without touching dashboard content. */
.core-content .page-header {
    margin-bottom: 22px;
    padding: 18px 20px;
    background: rgba(255,255,255,.86);
    border: 1px solid #e7edf4;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(15,23,42,.035);
}

.core-content .page-title {
    color: #10233f;
    font-size: 19px;
}

.core-content .page-subtitle {
    color: #708399;
}

.core-content .table-container,
.core-content .card,
.core-content .detail-card {
    border-color: #e5ebf2;
    box-shadow: 0 10px 28px rgba(15,23,42,.035);
}

@media (max-width: 1024px) {
    .core-sidebar {
        width: min(86vw, 300px);
        box-shadow: 22px 0 60px rgba(3,20,39,.30);
    }

    .core-sidebar-toggle {
        color: #34506a;
        background: #f4f7fa;
        border-color: #e2eaf1;
    }
}

@media (max-width: 640px) {
    .core-header {
        height: 68px;
        padding: 0 14px;
    }

    .core-context-badge {
        display: none;
    }

    .core-page-title {
        max-width: calc(100vw - 94px);
        font-size: 16px;
    }

    .core-content {
        padding: 16px 12px 24px;
    }

    .core-content .page-header {
        padding: 15px;
        border-radius: 12px;
    }
}

/* ==========================================
   Shared components & utilities
   (classes referenced by views but previously undefined)
   ========================================== */

/* Page heading inside content area */
.page-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

/* Badge variants */
.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 3px 8px;
}

.badge-outline-info {
    background: transparent;
    border: 1px solid var(--info);
    color: var(--info);
    padding: 3px 8px;
}

.badge-outline-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 3px 8px;
}

/* Icon-only button (used as .btn .btn-sm .btn-icon) */
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--white);
}

/* Table row action group */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn-warning:hover {
    border-color: var(--warning);
    color: var(--warning);
    background: var(--warning-light);
}

/* Detail header right-side actions */
.detail-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Numbered pagination links */
.pagination-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}

.pagination-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Generic table (alias of .data-table look) */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

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

/* Alerts */
.core-alert-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid var(--info);
}

/* Error page extras (500) */
.error-trace {
    margin: -8px 0 24px 0;
    color: var(--text-muted);
}

.error-trace code {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--text);
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Text color utilities */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

/* Display utilities */
.d-block { display: block; }

/* Large skeleton icon (detail headers) */
.skeleton-icon-lg {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

/* ==========================================
   Dashboard v2
   ========================================== */

/* Hero */
.dashboard-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px 32px;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #059669 0%, #10B981 55%, #34d399 100%);
    color: var(--white);
    overflow: hidden;
}

.dashboard-hero::before,
.dashboard-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.dashboard-hero::before {
    width: 260px;
    height: 260px;
    top: -140px;
    right: -60px;
}

.dashboard-hero::after {
    width: 160px;
    height: 160px;
    bottom: -100px;
    right: 180px;
}

.dashboard-hero-info h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.dashboard-hero-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.dashboard-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    transition: all var(--transition);
}

.hero-chip:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.hero-chip-warning {
    background: rgba(255, 255, 255, 0.92);
    color: #b45309;
    border-color: transparent;
}

.hero-chip-warning:hover {
    background: var(--white);
}

/* KPI cards */
.stat-card {
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    border-color: var(--border-dark);
}

.stat-foot {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.stat-foot-up {
    color: var(--success);
    font-weight: 600;
}

.stat-foot-warning {
    color: var(--warning);
    font-weight: 600;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    margin-bottom: 24px;
    align-items: stretch;
}

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

@media (max-width: 1100px) {
    .dashboard-grid,
    .dashboard-grid-even {
        grid-template-columns: 1fr;
    }
}

/* Dash cards */
.dash-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.dash-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.dash-card-title svg {
    color: var(--primary);
    flex-shrink: 0;
}

.dash-card-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

.dash-card-link:hover {
    text-decoration: underline;
}

.dash-card-meta {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 100px;
}

.dash-card-body {
    display: flex;
    flex-direction: column;
}

/* Dash rows (orders/users lists) */
.dash-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.dash-row:last-child {
    border-bottom: none;
}

.dash-row:hover {
    background: var(--bg);
}

.dash-row-avatar {
    flex-shrink: 0;
}

.dash-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-row-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-verified {
    color: var(--success);
    flex-shrink: 0;
}

.dash-row-sub {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.dash-row-amount {
    font-size: 13px;
    font-weight: 600;
}

.dash-row-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
}

/* Empty state */
.dash-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.dash-empty svg {
    opacity: 0.4;
    margin-bottom: 10px;
}

.dash-empty p {
    margin: 0;
    font-size: 13px;
}

/* Mini bar chart */
.dash-chart-body {
    padding: 20px;
}

.mini-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.mini-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.mini-bar-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    height: 14px;
    line-height: 14px;
}

.mini-bar-track {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: flex-end;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
}

.mini-bar {
    width: 100%;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #34d399, var(--primary));
    transition: height 0.4s ease;
}

.mini-bar-col.is-today .mini-bar {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.mini-bar-col.is-today .mini-bar-label {
    color: var(--primary);
    font-weight: 700;
}

.mini-bar-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Trial stats card */
.dash-trial-body {
    padding: 20px;
    gap: 20px;
}

.trial-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.trial-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 8px;
    background: var(--bg);
    border-radius: var(--radius);
}

.trial-mini-value {
    font-size: 20px;
    font-weight: 700;
}

.trial-mini-value.text-info { color: var(--info); }
.trial-mini-value.text-warning { color: var(--warning); }
.trial-mini-value.text-success { color: var(--success); }

.trial-mini-label {
    font-size: 12px;
    color: var(--text-muted);
}

.trial-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trial-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.trial-progress-head strong {
    font-size: 15px;
    color: var(--primary);
}

.trial-progress {
    height: 10px;
    background: var(--bg-dark);
    border-radius: 100px;
    overflow: hidden;
}

.trial-progress-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--primary), #34d399);
    transition: width 0.6s ease;
}

/* Skeleton additions */
.skeleton-hero {
    height: 108px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.skeleton-panel {
    height: 320px;
    border-radius: var(--radius-lg);
}

.skeleton-panel-sm {
    height: 220px;
    border-radius: var(--radius-lg);
}

.skeleton-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .skeleton-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-hero {
        padding: 22px 20px;
    }

    .dash-row-time {
        display: none;
    }
}

/* ==========================================
   Core UI polish - dashboard and shared pages
   ========================================== */
.core-content {
    max-width: none;
    margin: 0;
}

.core-header {
    min-height: var(--header-height);
    height: auto;
    padding-top: 9px;
    padding-bottom: 9px;
}

.core-page-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dashboard-page .dashboard-hero,
.dashboard-page .dashboard-stats,
.dashboard-page .dashboard-grid {
    margin-bottom: 0;
}

.dashboard-hero {
    min-height: 142px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 28px 30px;
    color: #17324d;
    background:
        radial-gradient(circle at 88% 12%, rgba(16,185,129,.13), transparent 25%),
        linear-gradient(135deg, #ffffff 0%, #f5fbf8 100%);
    border: 1px solid #dfece6;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .045);
}

.dashboard-hero::before,
.dashboard-hero::after {
    display: none;
}

.dashboard-hero-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    color: #059669;
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    border: 1px solid #b7edd5;
    border-radius: 16px;
    box-shadow: 0 9px 24px rgba(16, 185, 129, .13);
}

.dashboard-hero-info {
    min-width: 0;
}

.dashboard-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #059669;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.dashboard-hero-info h2 {
    margin-bottom: 5px;
    color: #10233f;
    font-size: clamp(20px, 2vw, 25px);
}

.dashboard-hero-date {
    color: #6c8196;
    opacity: 1;
}

.dashboard-hero-actions {
    margin-left: auto;
}

.hero-chip {
    color: #087b5a;
    background: #ffffff;
    border-color: #cfe8de;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
    backdrop-filter: none;
}

.hero-chip:hover {
    color: #05654a;
    background: #ecfdf5;
    border-color: #94d9bd;
}

.hero-chip-warning {
    color: #a16207;
    background: #fffbeb;
    border-color: #fde68a;
}

.hero-chip-warning:hover {
    color: #854d0e;
    background: #fef3c7;
}

.dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-kpi {
    min-width: 0;
    min-height: 124px;
    padding: 21px;
    border-color: #e4ebf2;
    border-radius: 15px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, .035);
    overflow: hidden;
}

.dashboard-kpi::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #10b981;
}

.dashboard-kpi-info::after { background: #3b82f6; }
.dashboard-kpi-warning::after { background: #f59e0b; }

.dashboard-kpi .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.dashboard-kpi .stat-value {
    color: #10233f;
    font-size: 27px;
    letter-spacing: -.035em;
}

.dashboard-kpi .stat-label {
    color: #536b82;
    font-weight: 600;
}

.dashboard-kpi .stat-foot {
    margin-top: 5px;
}

.dash-card {
    border-color: #e4ebf2;
    border-radius: 15px;
    box-shadow: 0 9px 28px rgba(15, 23, 42, .035);
}

.dash-card-header {
    min-height: 58px;
    padding: 16px 19px;
    background: #fbfcfd;
    border-bottom-color: #e8edf3;
}

.dash-row {
    min-height: 66px;
    padding: 11px 19px;
    border-bottom-color: #edf1f5;
}

.dash-row:hover {
    background: #f6fbf8;
}

.mini-bar-track {
    background: #f0f4f7;
}

.trial-mini {
    border: 1px solid #e7edf2;
    background: #f8fafb;
}

/* Shared list, form and detail surfaces */
.core-content .page-header {
    min-height: 64px;
    padding: 14px 16px;
    border-radius: 13px;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .03);
}

.core-content .table-container {
    overflow-x: auto;
    border-radius: 14px;
}

.data-table th,
.table th {
    padding-top: 13px;
    padding-bottom: 13px;
    color: #60758a;
    background: #f7f9fb;
    font-size: 11px;
    letter-spacing: .055em;
}

.data-table td,
.table td {
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom-color: #edf1f5;
}

.data-table tbody tr:hover,
.table tbody tr:hover {
    background: #f7fbf9;
}

.search-form {
    flex-wrap: wrap;
}

.search-input,
.search-select,
.form-control,
.form-input,
.form-select,
.form-textarea {
    border-color: #dce5ed;
    background-color: #ffffff;
}

.search-input:focus,
.search-select:focus,
.form-control:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #34b98c;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .09);
}

@media (max-width: 1280px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-page { gap: 16px; }

    .dashboard-hero {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 20px;
    }

    .dashboard-hero-mark {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 13px;
    }

    .dashboard-hero-actions {
        width: 100%;
        margin-left: 0;
    }

    .hero-chip {
        flex: 1;
        justify-content: center;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-kpi {
        min-height: 104px;
        padding: 18px;
    }

    .dash-card-header,
    .dash-row {
        padding-left: 15px;
        padding-right: 15px;
    }

    .dash-row-side .badge {
        display: none;
    }

    .core-content .page-header {
        min-height: auto;
    }

    .page-header-right,
    .page-header-left,
    .search-form {
        width: 100%;
    }

    .search-form .search-input,
    .search-form .search-select {
        flex: 1 1 190px;
        width: auto;
        min-width: 0;
    }
}
.support-core-attachments{display:flex;flex-direction:column;gap:7px;margin-top:10px}.support-core-attachment{display:flex;align-items:center;gap:9px;padding:9px 11px;color:#475569;background:rgba(255,255,255,.76);border:1px solid #e2e8f0;border-radius:8px;text-decoration:none;transition:.16s ease}.support-core-attachment:hover{color:#059669;border-color:rgba(16,185,129,.35);transform:translateY(-1px)}.support-core-attachment>span:first-child{display:grid;width:29px;height:29px;flex:0 0 auto;place-items:center;color:#059669;background:rgba(16,185,129,.1);border-radius:7px}.support-core-attachment>span:last-child{display:flex;min-width:0;flex-direction:column;gap:2px}.support-core-attachment strong{overflow:hidden;max-width:360px;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.support-core-attachment small{color:#94a3b8;font-size:9px}.support-core-reply-tools{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:11px!important;margin-top:9px!important}.support-core-attach-button{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;font-size:10px;font-weight:700;cursor:pointer}.support-core-attach-button:hover{color:#059669;border-color:rgba(16,185,129,.35)}.support-core-file-input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
