/* ================================================
   SHORTRIO MODERN THEME v2.0
   Clean, Mobile-First, Admin-Configurable
   ================================================ */

/* === CSS VARIABLES (Admin Configurable) === */
:root {
    /* Primary colors - overridden by admin settings via inline style */
    --sr-primary: #6366f1;
    --sr-primary-hover: #4f46e5;
    --sr-primary-light: #e0e7ff;
    --sr-primary-rgb: 99, 102, 241;

    /* Accent */
    --sr-accent: #f43f5e;
    --sr-accent-light: #ffe4e6;

    /* Neutrals */
    --sr-bg: #f1f5f9;
    --sr-surface: #ffffff;
    --sr-border: #e2e8f0;
    --sr-text: #1e293b;
    --sr-text-secondary: #64748b;
    --sr-text-muted: #94a3b8;

    /* Semantic */
    --sr-success: #10b981;
    --sr-success-light: #d1fae5;
    --sr-warning: #f59e0b;
    --sr-warning-light: #fef3c7;
    --sr-danger: #ef4444;
    --sr-danger-light: #fee2e2;
    --sr-info: #3b82f6;
    --sr-info-light: #dbeafe;

    /* Shadows */
    --sr-shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --sr-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --sr-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --sr-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);

    /* Radius */
    --sr-radius-sm: 8px;
    --sr-radius: 12px;
    --sr-radius-lg: 16px;
    --sr-radius-xl: 20px;

    /* Sidebar */
    --sr-sidebar-width: 260px;
    --sr-sidebar-collapsed: 0px;

    /* Transitions */
    --sr-transition: all 0.2s ease;
}

/* === DARK MODE === */
[data-theme="dark"] {
    --sr-bg: #0f172a;
    --sr-surface: #ffffff;
    --sr-border: #e2e8f0;
    --sr-text: #1e293b;
    --sr-text-secondary: #64748b;
    --sr-text-muted: #94a3b8;
    --sr-shadow-sm: 0 1px 3px rgba(0,0,0,0.15);
    --sr-shadow-md: 0 4px 6px rgba(0,0,0,0.15);
    --sr-shadow-lg: 0 10px 15px rgba(0,0,0,0.2);
}

/* Dark mode: cards stay WHITE, only background darkens */
[data-theme="dark"] .sr-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .dashboard-quick-card,
[data-theme="dark"] .main-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="dark"] .sr-card .card-title,
[data-theme="dark"] .sr-card h2,
[data-theme="dark"] .sr-card h3,
[data-theme="dark"] .sr-card h4 {
    color: #1e293b;
}

[data-theme="dark"] .table {
    background: #ffffff;
    color: #1e293b;
}
[data-theme="dark"] .table thead {
    background: #f8fafc;
}
[data-theme="dark"] .table thead th {
    color: #64748b;
}
[data-theme="dark"] .table tbody td {
    border-bottom-color: #f1f5f9;
    color: #1e293b;
}
[data-theme="dark"] .table tbody tr:hover {
    background: #f8fafc;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}
[data-theme="dark"] .form-control::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .sr-navbar {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-theme="dark"] .sr-sidebar {
    background: #1e293b;
    border-right-color: #334155;
}

[data-theme="dark"] .sr-sidebar .nav-link {
    color: #94a3b8;
}

[data-theme="dark"] .sr-page-header,
[data-theme="dark"] .sr-page-title {
    color: #f1f5f9;
}

[data-theme="dark"] .sr-input,
[data-theme="dark"] .sr-select {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}
[data-theme="dark"] .sr-sidebar .nav-link:hover,
[data-theme="dark"] .sr-sidebar .nav-link.active {
    background: rgba(var(--sr-primary-rgb), 0.15);
    color: var(--sr-primary);
}

/* === BASE RESET === */
*, *::before, *::after {
    box-sizing: border-box;
}

body.sr-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--sr-bg);
    color: var(--sr-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--sr-text);
    line-height: 1.3;
}

/* === NAVBAR === */
.sr-navbar {
    background: var(--sr-surface);
    border-bottom: 1px solid var(--sr-border);
    padding: 0 1.25rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: var(--sr-shadow-xs);
}

.sr-navbar .navbar-brand img {
    height: 32px;
    width: auto;
}

.sr-navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sr-navbar .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sr-primary-light);
    color: var(--sr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--sr-transition);
}
.sr-navbar .user-avatar:hover {
    border-color: var(--sr-primary);
}

/* Dark mode toggle */
.dark-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--sr-border);
    background: var(--sr-surface);
    color: var(--sr-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--sr-transition);
    font-size: 1.1rem;
}
.dark-toggle:hover {
    background: var(--sr-primary-light);
    color: var(--sr-primary);
    border-color: var(--sr-primary);
}

/* === SIDEBAR === */
.sr-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: var(--sr-sidebar-width);
    height: calc(100vh - 60px);
    background: var(--sr-surface);
    border-right: 1px solid var(--sr-border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1020;
    padding: 1rem 0;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sr-sidebar::-webkit-scrollbar {
    width: 4px;
}
.sr-sidebar::-webkit-scrollbar-thumb {
    background: var(--sr-border);
    border-radius: 4px;
}

.sr-sidebar .nav-section {
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.sr-sidebar .nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sr-text-muted);
    padding: 0.75rem 0.75rem 0.4rem;
    margin: 0;
}

.sr-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    margin: 1px 0;
    border-radius: var(--sr-radius-sm);
    color: var(--sr-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--sr-transition);
    white-space: nowrap;
}

.sr-sidebar .nav-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sr-sidebar .nav-link:hover {
    background: var(--sr-primary-light);
    color: var(--sr-primary);
}

.sr-sidebar .nav-link.active {
    background: var(--sr-primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(var(--sr-primary-rgb), 0.3);
}
.sr-sidebar .nav-link.active i {
    color: #fff;
}

.sr-sidebar .nav-badge {
    background: var(--sr-accent);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: auto;
}

/* === MAIN CONTENT === */
.sr-main {
    margin-left: var(--sr-sidebar-width);
    margin-top: 60px;
    padding: 1.5rem;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease;
}

/* === CARDS === */
.sr-card {
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-lg);
    box-shadow: var(--sr-shadow-sm);
    padding: 1.5rem;
    transition: var(--sr-transition);
}

.sr-card:hover {
    box-shadow: var(--sr-shadow-md);
}

.sr-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sr-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sr-card .card-title i {
    color: var(--sr-primary);
}

/* === STAT CARDS === */
.stat-card {
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-lg);
    padding: 1.25rem;
    transition: var(--sr-transition);
    box-shadow: var(--sr-shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--sr-primary);
    border-radius: 4px 0 0 4px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sr-shadow-md);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--sr-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--sr-primary-light);
    color: var(--sr-primary);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--sr-text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--sr-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* === BUTTONS === */
.sr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--sr-radius);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: var(--sr-transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.sr-btn-primary {
    background: var(--sr-primary);
    color: #fff;
}
.sr-btn-primary:hover {
    background: var(--sr-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--sr-primary-rgb), 0.3);
    color: #fff;
}

.sr-btn-outline {
    background: transparent;
    border: 1.5px solid var(--sr-border);
    color: var(--sr-text-secondary);
}
.sr-btn-outline:hover {
    border-color: var(--sr-primary);
    color: var(--sr-primary);
    background: var(--sr-primary-light);
}

.sr-btn-success { background: var(--sr-success); color: #fff; }
.sr-btn-success:hover { background: #059669; color: #fff; transform: translateY(-1px); }

.sr-btn-warning { background: var(--sr-warning); color: #fff; }
.sr-btn-warning:hover { background: #d97706; color: #fff; transform: translateY(-1px); }

.sr-btn-danger { background: var(--sr-danger); color: #fff; }
.sr-btn-danger:hover { background: #dc2626; color: #fff; transform: translateY(-1px); }

.sr-btn-info { background: var(--sr-info); color: #fff; }
.sr-btn-info:hover { background: #2563eb; color: #fff; transform: translateY(-1px); }

.sr-btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    border-radius: var(--sr-radius-sm);
}

.sr-btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--sr-radius);
}

.sr-btn-block {
    width: 100%;
}

/* === FORMS === */
.sr-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--sr-border);
    border-radius: var(--sr-radius);
    font-size: 0.9rem;
    color: var(--sr-text);
    background: var(--sr-surface);
    transition: var(--sr-transition);
    outline: none;
}

.sr-input:focus {
    border-color: var(--sr-primary);
    box-shadow: 0 0 0 3px rgba(var(--sr-primary-rgb), 0.1);
}

.sr-input::placeholder {
    color: var(--sr-text-muted);
}

.sr-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sr-text);
    margin-bottom: 0.375rem;
}

/* === TABLES === */
.sr-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--sr-surface);
    border-radius: var(--sr-radius-lg);
    overflow: hidden;
    border: 1px solid var(--sr-border);
}

.sr-table thead {
    background: var(--sr-bg);
}

.sr-table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sr-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--sr-border);
}

.sr-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--sr-text);
    border-bottom: 1px solid var(--sr-border);
    vertical-align: middle;
}

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

.sr-table tbody tr:hover {
    background: rgba(var(--sr-primary-rgb), 0.03);
}

/* === BADGES === */
.sr-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sr-badge-primary { background: var(--sr-primary-light); color: var(--sr-primary); }
.sr-badge-success { background: var(--sr-success-light); color: var(--sr-success); }
.sr-badge-warning { background: var(--sr-warning-light); color: #92400e; }
.sr-badge-danger { background: var(--sr-danger-light); color: var(--sr-danger); }
.sr-badge-info { background: var(--sr-info-light); color: var(--sr-info); }

/* === ALERTS === */
.sr-alert {
    padding: 0.875rem 1rem;
    border-radius: var(--sr-radius);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.sr-alert-success { background: var(--sr-success-light); border-color: var(--sr-success); color: #065f46; }
.sr-alert-warning { background: var(--sr-warning-light); border-color: var(--sr-warning); color: #92400e; }
.sr-alert-danger { background: var(--sr-danger-light); border-color: var(--sr-danger); color: #991b1b; }
.sr-alert-info { background: var(--sr-info-light); border-color: var(--sr-info); color: #1e40af; }

/* === PAGE HEADER === */
.sr-page-header {
    margin-bottom: 1.5rem;
}

.sr-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sr-text);
    margin: 0 0 0.25rem;
}

.sr-page-subtitle {
    font-size: 0.9rem;
    color: var(--sr-text-muted);
    margin: 0;
}

/* === GRID === */
.sr-grid {
    display: grid;
    gap: 1rem;
}

.sr-grid-2 { grid-template-columns: repeat(2, 1fr); }
.sr-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sr-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === ACTION BUTTONS ROW === */
.sr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* === DROPDOWN === */
.sr-dropdown {
    position: relative;
    display: inline-block;
}

.sr-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow-lg);
    min-width: 200px;
    padding: 0.5rem;
    z-index: 1050;
    display: none;
}

.sr-dropdown-menu.show {
    display: block;
    animation: srFadeIn 0.15s ease;
}

.sr-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--sr-radius-sm);
    color: var(--sr-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--sr-transition);
}

.sr-dropdown-item:hover {
    background: var(--sr-primary-light);
    color: var(--sr-primary);
}

.sr-dropdown-divider {
    height: 1px;
    background: var(--sr-border);
    margin: 0.375rem 0;
}

/* === MODAL OVERRIDE === */
.modal-content {
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-lg) !important;
    box-shadow: var(--sr-shadow-lg);
    overflow: hidden;
}

.modal-header {
    background: var(--sr-primary);
    color: #fff;
    border: none;
    padding: 1rem 1.25rem;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    border-top: 1px solid var(--sr-border);
    padding: 0.875rem 1.25rem;
}

/* === FOOTER === */
.sr-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--sr-text-muted);
}

.sr-footer a {
    color: var(--sr-text-secondary);
    text-decoration: none;
    transition: var(--sr-transition);
}

.sr-footer a:hover {
    color: var(--sr-primary);
}

/* === ANIMATIONS === */
@keyframes srFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.sr-animate {
    animation: srSlideIn 0.35s ease;
}

/* === EMPTY STATE === */
.sr-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--sr-text-muted);
}

.sr-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.sr-empty p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* === COPY BUTTON === */
.sr-copy-btn {
    background: var(--sr-primary);
    color: #fff;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--sr-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sr-transition);
}
.sr-copy-btn:hover { background: var(--sr-primary-hover); }

/* === PROMO FLOATING CARD === */
.promo-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 320px;
    z-index: 1040;
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--sr-shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: srSlideIn 0.5s ease;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--sr-border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--sr-text-muted);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 1024px) {
    .sr-sidebar {
        transform: translateX(-100%);
    }
    .sr-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--sr-shadow-lg);
    }
    .sr-main {
        margin-left: 0;
    }
    .sr-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .sr-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .sr-main {
        padding: 1rem;
    }
    .sr-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    .sr-grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }
    .sr-grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    .sr-page-title {
        font-size: 1.25rem;
    }
    .sr-actions {
        flex-direction: column;
    }
    .sr-actions .sr-btn {
        width: 100%;
    }
    .sr-table {
        font-size: 0.8rem;
    }
    .sr-table thead th,
    .sr-table tbody td {
        padding: 0.5rem 0.625rem;
    }
    .stat-card {
        padding: 0.875rem;
    }
    .stat-card .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    .stat-card .stat-label {
        font-size: 0.7rem;
    }
    .sr-quick-action {
        padding: 0.75rem 0.5rem;
    }
    .sr-quick-action i {
        font-size: 1.25rem;
    }
    .sr-quick-action span {
        font-size: 0.7rem;
    }
    .promo-floating {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

/* === SIDEBAR OVERLAY (mobile) === */
.sr-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1015;
}

@media (max-width: 1024px) {
    .sr-sidebar.open ~ .sr-sidebar-overlay,
    .sr-sidebar-overlay.show {
        display: block;
    }
}

/* === ADMIN-SPECIFIC === */
.admin-sidebar {
    width: var(--sr-sidebar-width);
    min-height: calc(100vh - 60px);
    background: var(--sr-surface);
    border-right: 1px solid var(--sr-border);
    padding: 1rem 0;
    position: fixed;
    top: 60px;
    left: 0;
    overflow-y: auto;
}

/* === COLOR PICKER FIELD === */
.sr-color-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sr-color-picker input[type="color"] {
    width: 44px;
    height: 44px;
    border: 2px solid var(--sr-border);
    border-radius: var(--sr-radius-sm);
    cursor: pointer;
    padding: 2px;
    background: var(--sr-surface);
}

.sr-color-picker input[type="text"] {
    width: 120px;
    text-transform: uppercase;
}

/* === LINK ITEM CARD === */
.sr-link-item {
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--sr-transition);
    margin-bottom: 0.5rem;
}

.sr-link-item:hover {
    border-color: var(--sr-primary);
    box-shadow: var(--sr-shadow-sm);
}

.sr-link-item .link-info {
    flex: 1;
    min-width: 0;
}

.sr-link-item .link-short {
    font-weight: 700;
    color: var(--sr-primary);
    font-size: 0.9rem;
    text-decoration: none;
}

.sr-link-item .link-original {
    font-size: 0.8rem;
    color: var(--sr-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-link-item .link-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sr-link-item .link-clicks {
    font-weight: 700;
    color: var(--sr-text);
    font-size: 0.9rem;
}

/* === PLAN BADGES === */
.plan-free { background: #f1f5f9; color: #64748b; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.plan-basic { background: #dbeafe; color: #2563eb; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.plan-pro { background: #fef3c7; color: #d97706; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }

/* === MOBILE BOTTOM NAV === */
.sr-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sr-card);
    border-top: 1px solid var(--sr-border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0.35rem 0 0.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.sr-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--sr-text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    gap: 0.15rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.sr-bottom-nav-item i { font-size: 1.15rem; }
.sr-bottom-nav-item.active { color: var(--sr-primary); }
.sr-bottom-nav-item:hover { color: var(--sr-primary); }
.sr-bottom-nav-create {
    background: var(--sr-primary);
    color: #fff !important;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-top: -18px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
    padding: 0;
    gap: 0;
}
.sr-bottom-nav-create i { font-size: 1.3rem; }
.sr-bottom-nav-create span { display: none; }
.sr-bottom-nav-create.active { background: #4f46e5; }

@media (max-width: 768px) {
    .sr-bottom-nav { display: flex; }
    .sr-footer { padding-bottom: 4.5rem; }
    .sr-main { padding-bottom: 4.5rem; }
}

/* === LOADING SKELETON === */
.sr-loading-overlay {
    position: fixed;
    top: 56px;
    left: 240px;
    right: 0;
    bottom: 0;
    background: var(--sr-bg);
    z-index: 50;
    transition: opacity 0.3s ease;
}
.sr-loading-overlay.hidden { opacity: 0; pointer-events: none; }
@media (max-width: 1024px) {
    .sr-loading-overlay { left: 0; }
}
.sr-skeleton {
    background: linear-gradient(90deg, var(--sr-border) 25%, rgba(var(--sr-primary-rgb), 0.05) 50%, var(--sr-border) 75%);
    background-size: 200% 100%;
    animation: srSkeleton 1.5s ease-in-out infinite;
    border-radius: var(--sr-radius-sm);
}

@keyframes srSkeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === QUICK ACTION CARDS === */
.sr-quick-action {
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--sr-transition);
    text-decoration: none;
    color: var(--sr-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.sr-quick-action:hover {
    border-color: var(--sr-primary);
    background: var(--sr-primary-light);
    color: var(--sr-primary);
    transform: translateY(-2px);
}

.sr-quick-action i {
    font-size: 1.5rem;
    color: var(--sr-primary);
}

.sr-quick-action span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* === AUTH PAGES (Login/Register) === */
.sr-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sr-bg);
    padding: 1.5rem;
}

.sr-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.5s ease;
}

.sr-auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.sr-auth-logo img {
    height: 56px;
    margin-bottom: 0.75rem;
}

.sr-auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sr-primary);
    margin: 0;
}

.sr-auth-logo p {
    font-size: 0.85rem;
    color: var(--sr-text-muted);
    margin: 0.25rem 0 0;
}

.sr-auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--sr-text-muted);
}

.sr-auth-footer a {
    color: var(--sr-primary);
    font-weight: 600;
    text-decoration: none;
}

.sr-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--sr-text-muted);
    font-size: 0.8rem;
}

.sr-auth-divider::before,
.sr-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--sr-border);
}

.password-toggle {
    position: relative;
}

.password-toggle .toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--sr-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

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

/* === SUBSCRIPTION PAGE === */
.sub-card {
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-lg);
    box-shadow: var(--sr-shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--sr-transition);
}

.sub-card:hover {
    box-shadow: var(--sr-shadow-md);
}

.sub-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sr-text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--sr-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-section-title i {
    color: var(--sr-primary);
    font-size: 1.2rem;
}

.plan-info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

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

.plan-label {
    font-size: 0.875rem;
    color: var(--sr-text-secondary);
    font-weight: 500;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-label i {
    color: var(--sr-text-muted);
    font-size: 1rem;
}

.plan-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sr-text);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

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

.badge-cancelled {
    background: var(--sr-warning-light);
    color: #92400e;
}

.badge-pending {
    background: var(--sr-warning-light);
    color: #92400e;
}

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

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

/* Subscription page table compatibility */
.sub-card .table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.sub-card .table thead {
    background: var(--sr-bg);
}

.sub-card .table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sr-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--sr-border);
}

.sub-card .table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--sr-text);
    border-bottom: 1px solid var(--sr-border);
    vertical-align: middle;
}

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

.sub-card .table tbody tr:hover {
    background: rgba(var(--sr-primary-rgb), 0.03);
}

.sub-card .table-responsive {
    overflow-x: auto;
    border-radius: var(--sr-radius);
}

/* Bootstrap alert compatibility for subscription */
.sub-card .alert {
    padding: 0.875rem 1rem;
    border-radius: var(--sr-radius);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-card .alert-info {
    background: var(--sr-info-light);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Bootstrap btn compatibility */
.btn-sm.btn-outline-primary {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    border: 1.5px solid var(--sr-primary);
    color: var(--sr-primary);
    border-radius: var(--sr-radius-sm);
    background: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: var(--sr-transition);
}

.btn-sm.btn-outline-primary:hover {
    background: var(--sr-primary);
    color: #fff;
}
