/* LynkIN - Modern UI Styles */

/* Honeypot — hidden from users, visible to bots */
.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: #9898a8;
    --text-muted: #68687a;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', var(--font-sans);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --surface-overlay: rgba(0, 0, 0, 0.3);
    --surface-muted: rgba(255, 255, 255, 0.05);
    --navbar-bg: rgba(10, 10, 15, 0.8);
    --dropdown-bg: rgba(18, 18, 26, 0.98);
    --modal-header-bg: rgba(18, 18, 26, 0.95);
    --loader-backdrop: rgba(10, 10, 15, 0.92);
    --loader-surface: rgba(255, 255, 255, 0.06);
    --loader-surface-border: rgba(255, 255, 255, 0.12);
    --grid-line: rgba(255, 255, 255, 0.02);
    --chart-grid: rgba(255, 255, 255, 0.05);
    --chart-accent-soft: rgba(99, 102, 241, 0.1);
    --chart-accent-fill: rgba(99, 102, 241, 0.6);
    --chart-point-border: #ffffff;
    color-scheme: dark;
    --footer-bg: rgba(10, 10, 15, 0.6);
}

[data-theme="light"] {
    --bg-primary: #f4f6fb;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: #ffffff;
    --border-color: rgba(15, 23, 42, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-glow: 0 8px 32px rgba(99, 102, 241, 0.1);
    --surface-overlay: rgba(255, 255, 255, 0.85);
    --surface-muted: rgba(15, 23, 42, 0.04);
    --navbar-bg: rgba(244, 246, 251, 0.92);
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --modal-header-bg: rgba(255, 255, 255, 0.98);
    --loader-backdrop: rgba(244, 246, 251, 0.94);
    --loader-surface: rgba(255, 255, 255, 0.95);
    --loader-surface-border: rgba(15, 23, 42, 0.08);
    --grid-line: rgba(15, 23, 42, 0.06);
    --chart-grid: rgba(15, 23, 42, 0.08);
    --chart-accent-soft: rgba(99, 102, 241, 0.12);
    --chart-accent-fill: rgba(99, 102, 241, 0.55);
    --chart-point-border: #ffffff;
    color-scheme: light;
    --footer-bg: rgba(244, 246, 251, 0.85);
}

[data-theme="light"] .bg-gradient {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.07), transparent),
        radial-gradient(ellipse 40% 30% at 0% 80%, rgba(168, 85, 247, 0.05), transparent);
}

[data-theme="light"] .toast-success {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

[data-theme="light"] .toast-error {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.22);
}

[data-theme="light"] .toast-info {
    color: #4338ca;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.22);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    background: var(--bg-primary);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

body > .navbar {
    flex-shrink: 0;
}

body > main {
    flex: 1 0 auto;
    width: 100%;
}

html.is-loading {
    overflow: hidden;
}

/* Page Loader */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-loader-active {
    opacity: 1;
    visibility: visible;
}

.page-loader-exit {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 40%, rgba(99, 102, 241, 0.18), transparent),
        var(--loader-backdrop);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.page-loader-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 32px;
    animation: loader-content-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes loader-content-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.page-loader-visual {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-loader-orbit {
    position: absolute;
    inset: 0;
}

.page-loader-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(99, 102, 241, 0.9);
    border-right-color: rgba(139, 92, 246, 0.5);
    animation: loader-orbit-spin 1.2s linear infinite;
}

.page-loader-orbit-ring-2 {
    inset: 10px;
    border-top-color: rgba(168, 85, 247, 0.7);
    border-right-color: transparent;
    border-left-color: rgba(99, 102, 241, 0.3);
    animation-duration: 1.8s;
    animation-direction: reverse;
}

.page-loader-orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.8);
    top: 50%;
    left: 50%;
    margin: -4px 0 0 -4px;
    animation: loader-orbit-travel 2s ease-in-out infinite;
}

.page-loader-orbit-dot.dot-2 {
    animation-delay: -0.66s;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    opacity: 0.8;
}

.page-loader-orbit-dot.dot-3 {
    animation-delay: -1.33s;
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    opacity: 0.6;
}

@keyframes loader-orbit-spin {
    to { transform: rotate(360deg); }
}

@keyframes loader-orbit-travel {
    0%   { transform: rotate(0deg) translateX(52px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(52px) rotate(-360deg); }
}

.page-loader-logo-wrap {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    padding: 4px;
    background: var(--loader-surface);
    border: 1px solid var(--loader-surface-border);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.25);
    animation: loader-logo-pulse 2s ease-in-out infinite;
}

.page-loader-logo {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

@keyframes loader-logo-pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.2); transform: scale(1); }
    50%      { box-shadow: 0 0 50px rgba(139, 92, 246, 0.45); transform: scale(1.04); }
}

.page-loader-shorten {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 28px;
    margin-top: 4px;
}

.page-loader-url-long {
    display: block;
    height: 8px;
    width: 100px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.45));
    animation: loader-url-shrink 2s ease-in-out infinite;
    transform-origin: right center;
}

.page-loader-url-arrow {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
    animation: loader-arrow-pulse 2s ease-in-out infinite;
}

.page-loader-url-arrow svg {
    width: 100%;
    height: 100%;
}

.page-loader-url-short {
    display: block;
    height: 10px;
    width: 0;
    border-radius: 5px;
    background: var(--accent-gradient);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.5);
    animation: loader-url-grow 2s ease-in-out infinite;
}

@keyframes loader-url-shrink {
    0%, 100% { width: 100px; opacity: 1; }
    45%, 55% { width: 24px; opacity: 0.5; }
}

@keyframes loader-url-grow {
    0%, 35% { width: 0; opacity: 0; }
    50%, 85% { width: 36px; opacity: 1; }
    100% { width: 0; opacity: 0; }
}

@keyframes loader-arrow-pulse {
    0%, 100% { opacity: 0.4; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(3px); }
}

.page-loader-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    animation: loader-brand-shimmer 2.5s ease-in-out infinite;
}

@keyframes loader-brand-shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
}

.page-loader-tagline {
    margin: -8px 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-loader-track {
    width: 160px;
    height: 3px;
    border-radius: 3px;
    background: var(--surface-muted);
    overflow: hidden;
    margin-top: 4px;
}

.page-loader-track-fill {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 3px;
    background: var(--accent-gradient);
    animation: loader-track-slide 1.4s ease-in-out infinite;
}

@keyframes loader-track-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 40% 30% at 0% 80%, rgba(168, 85, 247, 0.1), transparent);
    pointer-events: none;
    z-index: -2;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.logo-img-sm {
    width: 32px;
    height: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.admin-link {
    color: var(--accent-secondary);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 4px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.theme-toggle:focus-visible {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.theme-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.theme-icon-moon {
    display: none;
}

[data-theme="light"] .theme-icon-sun {
    display: none;
}

[data-theme="light"] .theme-icon-moon {
    display: block;
}

/* Profile dropdown */
.profile-dropdown {
    position: relative;
    margin-left: 8px;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    color: var(--text-primary);
}

.profile-trigger:hover,
.profile-dropdown.open .profile-trigger {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.profile-chevron {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.profile-dropdown.open .profile-chevron {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: var(--dropdown-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(20px);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 200;
}

.profile-dropdown.open .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.user-avatar-lg {
    width: 42px;
    height: 42px;
    font-size: 1rem;
}

.profile-dropdown-name {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
}

.profile-dropdown-phone {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 8px;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    transition: all var(--transition);
    text-align: left;
}

.profile-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.profile-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.profile-dropdown-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Account / Profile / Settings */
.account-page {
    padding: 40px 0 80px;
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

.account-sidebar {
    padding: 24px;
    position: sticky;
    top: 100px;
}

.account-sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.account-sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.account-sidebar-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.account-sidebar-phone {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition);
}

.account-nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.account-nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.account-nav-icon {
    font-size: 1.1rem;
}

.account-page-header {
    margin-bottom: 28px;
}

.account-page-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 4px;
}

.account-page-header p {
    color: var(--text-secondary);
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.profile-hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.profile-hero-info {
    flex: 1;
    min-width: 200px;
}

.profile-hero-info h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.profile-hero-phone {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-admin {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.profile-stat-card {
    padding: 24px;
    text-align: center;
}

.profile-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.profile-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-details {
    padding: 28px;
}

.profile-details h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

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

.details-row dt {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.details-row dd {
    font-size: 0.9375rem;
    text-align: right;
}

.settings-section {
    padding: 28px;
    margin-bottom: 24px;
}

.settings-section-header {
    margin-bottom: 24px;
}

.settings-section-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.settings-section-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.label-optional {
    font-weight: 400;
    color: var(--text-muted);
}

.field-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.phone-input-readonly {
    opacity: 0.7;
    cursor: not-allowed;
}

.phone-input-readonly .input {
    cursor: not-allowed;
}

select.input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239898a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.settings-admin-note {
    border-color: rgba(139, 92, 246, 0.25);
}

#password:target {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

a.btn-primary,
a.btn-primary:hover,
a.btn-primary:visited {
    color: #ffffff;
    text-decoration: none;
}

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

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.btn-danger {
    color: var(--danger) !important;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-loader-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 18px;
}

.btn-loader-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    animation: btn-dot-bounce 1s ease-in-out infinite;
}

.btn-loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.btn-loader-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes btn-dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
    40% { transform: translateY(-5px); opacity: 1; }
}

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

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.btn-icon:hover {
    opacity: 1;
}

/* Inputs */
.input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-overlay);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

.input-lg {
    padding: 16px 20px;
    font-size: 1rem;
}

.input-sm {
    padding: 8px 12px;
    font-size: 0.875rem;
    max-width: 280px;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group .input {
    flex: 1;
}

.phone-input {
    display: flex;
    align-items: center;
    background: var(--surface-overlay);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.phone-input:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.phone-prefix {
    padding: 12px 14px;
    background: var(--surface-muted);
    color: var(--text-secondary);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
}

.phone-input .input {
    border: none;
    background: transparent;
    box-shadow: none !important;
}

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #a5b4fc;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
}

.shorten-card {
    max-width: 720px;
    margin: 0 auto 48px;
    padding: 32px;
    box-shadow: var(--shadow-glow);
}

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

.form-hint a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.form-hint a:hover {
    text-decoration: underline;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Features */
.features {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    transition: transform var(--transition), background var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* CTA */
.cta-section {
    padding: 40px 0 100px;
}

.cta-card {
    text-align: center;
    padding: 60px 40px;
}

.cta-card h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.cta-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 40px 24px;
}

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

.auth-card {
    padding: 40px;
}

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

.auth-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

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

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-page {
    padding: 40px 0 80px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 24px;
}

.dashboard-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 4px;
}

.dashboard-header p {
    color: var(--text-secondary);
}

.dashboard-stats-row {
    display: flex;
    gap: 16px;
}

.mini-stat {
    padding: 16px 24px;
    text-align: center;
    min-width: 120px;
}

.mini-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.mini-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.shorten-card h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.shorten-card {
    padding: 28px;
    margin-bottom: 40px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

.flex-grow {
    flex: 1;
    min-width: 200px;
}

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

.shorten-result {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.result-url-row {
    display: flex;
    gap: 12px;
}

.result-url-row .input {
    font-family: monospace;
    color: var(--success);
}

/* Links Grid */
.section-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* My Links page */
.links-page {
    padding: 40px 0 80px;
}

.links-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 20px;
}

.links-page-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 4px;
}

.links-page-header p {
    color: var(--text-secondary);
}

.links-toolbar {
    padding: 20px 24px;
    margin-bottom: 20px;
}

.links-toolbar-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.links-search-wrap {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.links-search-wrap .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.5;
    pointer-events: none;
}

.links-search-wrap .input {
    padding-left: 40px;
}

.links-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.links-filters .input-sm {
    min-width: 140px;
    max-width: none;
}

.links-summary {
    margin-top: 14px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.links-table td {
    vertical-align: middle;
}

.links-title-cell {
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.links-short-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 180px;
}

.clicks-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.8125rem;
}

.links-empty {
    text-align: center;
    padding: 60px 40px;
    margin-bottom: 24px;
}

.an-short-url {
    font-size: 0.875rem !important;
    word-break: break-all;
    line-height: 1.4;
}

.links-section {
    margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
}

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

.link-card {
    padding: 24px;
    transition: transform var(--transition), background var(--transition);
}

.link-card:hover {
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

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

.link-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.link-original {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    word-break: break-all;
}

.link-short-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.link-short-url {
    color: var(--success);
    font-family: monospace;
    font-size: 0.875rem;
    text-decoration: none;
    word-break: break-all;
}

.link-short-url:hover {
    text-decoration: underline;
}

.link-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.click-count {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.link-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.link-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-user {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-guest {
    background: var(--surface-muted);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--modal-header-bg);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

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

.modal-body {
    padding: 28px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 24px;
    color: var(--text-muted);
}

.loading-state::before {
    content: '';
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent-primary);
    animation: spin 0.7s linear infinite;
}

.loading-cell {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}

/* Analytics */
.analytics-summary {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.analytics-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.analytics-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.chart-container {
    position: relative;
    height: 280px;
    margin-bottom: 32px;
}

.analytics-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.analytics-table-section h3 {
    font-size: 0.9375rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.analytics-table-section.full-width {
    grid-column: 1 / -1;
}

.analytics-list {
    list-style: none;
}

.analytics-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.analytics-list .count {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Data Tables */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

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

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.2);
    white-space: nowrap;
}

.data-table td {
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.url-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Admin */
.admin-page {
    padding: 40px 0 48px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.admin-container {
    width: 100%;
    max-width: 1200px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    margin-bottom: 28px;
    flex-shrink: 0;
    width: 100%;
}

.admin-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 72px;
    width: 100%;
}

.admin-header-title {
    flex: 1;
    min-width: 0;
}

.admin-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 4px;
    line-height: 1.2;
}

.admin-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
    min-height: 1.5em;
}

.admin-content {
    flex: 1;
    width: 100%;
    min-height: 640px;
    display: flex;
    flex-direction: column;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.admin-page .table-wrapper,
.admin-table-panel {
    min-height: 420px;
    overflow-x: auto;
    width: 100%;
}

.admin-table-panel .data-table {
    width: 100%;
    min-width: 760px;
}

.admin-skeleton-row td {
    height: 48px;
    padding: 0 16px !important;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 100%
    );
    background-size: 200% 100%;
    animation: admin-shimmer 1.4s infinite;
    border-bottom: 1px solid var(--border-color);
}

.admin-pagination {
    min-height: 40px;
    margin-top: 24px;
}

body.admin-layout {
    overflow-x: hidden;
}

body.admin-layout .admin-page {
    contain: layout style;
}

.admin-toolbar {
    padding: 16px 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

/* Content Editor (Admin) */
.content-editor-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.content-editor-tab {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.content-editor-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.content-editor-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.content-editor-loading {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.content-editor-form {
    padding: 28px;
    margin-bottom: 24px;
}

.content-editor-form h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.content-subheading {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 24px 0 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.content-editor-hint {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 20px;
}

.content-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.content-textarea {
    min-height: 320px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.content-editor-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.content-repeater {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.content-repeater-row {
    padding: 16px;
}

.content-link-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.content-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}

.content-checkbox-row {
    margin-top: 16px;
}

.performance-toggle-label {
    align-items: flex-start;
    gap: 12px;
}

.performance-toggle-label small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.5;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.cms-content .legal-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.cms-content .legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-tab {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.admin-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.admin-stat-card {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    min-height: 88px;
}

.admin-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
}

.admin-stat-content {
    min-width: 0;
}

.admin-stat-card .stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-primary);
}

.admin-stat-card .stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-stat-card.danger .admin-stat-icon {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
}

.admin-stat-card.danger .stat-value {
    color: var(--danger);
}

.admin-stat-skeleton {
    position: relative;
    overflow: hidden;
    border-color: transparent;
}

.admin-stat-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    animation: admin-shimmer 1.4s infinite;
}

@keyframes admin-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.admin-chart-card {
    padding: 24px 28px 28px;
    margin-bottom: 0;
}

.admin-chart-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-chart-card h2 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    margin-bottom: 0;
}

.admin-chart-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.admin-chart-container {
    height: 300px;
    margin-bottom: 0;
}

.admin-feedback-card {
    padding: 24px 28px 28px;
    margin-top: 24px;
}

.admin-feedback-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-feedback-item {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.admin-feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.admin-feedback-item-header strong {
    margin-right: 8px;
}

.admin-feedback-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.admin-feedback-message {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-feedback-phone {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-feedback-empty {
    padding: 24px 0;
    text-align: center;
}

.footer-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.footer-feedback-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #e0e7ff;
    border-color: rgba(99, 102, 241, 0.5);
}

.footer-minimal-nav .footer-feedback-btn {
    padding: 6px 12px;
}

.footer-bottom-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.feedback-modal-content {
    max-width: 520px;
}

.feedback-modal-intro {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 20px;
}

.feedback-textarea {
    min-height: 120px;
    resize: vertical;
}

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

.admin-table .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

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

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Error Pages */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
}

.error-card {
    text-align: center;
    max-width: 480px;
    width: 100%;
    padding: 48px 40px;
}

.error-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.error-logo {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
}

.error-code {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-icon {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.error-icon.blocked {
    font-size: 4rem;
    color: var(--danger);
    -webkit-text-fill-color: var(--danger);
}

.error-card h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.error-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

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

/* Toast */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.toast-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.toast-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.toast-info {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1100px) {
    .admin-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 48px 0 60px;
    }

    .input-group {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .analytics-tables {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 8px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .shorten-card {
        padding: 20px;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

    .profile-hero {
        flex-direction: column;
        text-align: center;
    }

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

    .details-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .details-row dd {
        text-align: left;
    }

    .links-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .links-filters {
        width: 100%;
    }

    .links-filters .input-sm {
        flex: 1;
        min-width: 0;
    }

    .section-header-actions {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .content-form-grid {
        grid-template-columns: 1fr;
    }

    .content-link-row {
        grid-template-columns: 1fr;
    }

    .admin-header-top {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }

    .admin-tabs {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-tab {
        flex: 1;
        text-align: center;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-chart-container {
        height: 240px;
    }

    .footer-minimal-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-minimal-about {
        padding: 14px 16px;
    }

    .footer-minimal-nav {
        justify-content: center;
        gap: 14px 18px;
    }

    .footer-minimal-meta {
        justify-content: center;
    }
}

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

/* Site Footer */
.site-footer {
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
    padding: 60px 0 0;
    border-top: 1px solid var(--border-color);
    background: var(--footer-bg);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.site-footer-minimal {
    padding: 24px 0 20px;
}

.footer-minimal-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-minimal-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.footer-minimal-about {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.footer-minimal-about h4 {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.footer-minimal-about p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

.footer-minimal-about a {
    color: var(--accent-primary);
    text-decoration: none;
    margin-left: 4px;
}

.footer-minimal-about a:hover {
    text-decoration: underline;
}

.site-footer-minimal .footer-logo {
    margin-bottom: 0;
    font-size: 1.0625rem;
}

.footer-minimal-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-minimal-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
}

.footer-minimal-nav a:hover {
    color: var(--text-primary);
}

.footer-minimal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-india-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-minimal-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
    gap: 40px;
    padding-bottom: 48px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 320px;
}

.footer-tagline strong {
    color: var(--success);
}

.footer-india {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 153, 51, 0.08);
    border: 1px solid rgba(255, 153, 51, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-india-flag {
    font-size: 1.25rem;
}

.footer-india strong {
    color: #ff9933;
}

.footer-links-col h4,
.footer-about-col h4,
.footer-contact-col h4 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--transition);
}

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

.footer-about-text,
.footer-contact-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-about-text strong {
    color: var(--text-primary);
}

.footer-free-note {
    font-size: 0.875rem;
    color: #a5b4fc;
    padding: 12px 14px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 102, 241, 0.2);
    line-height: 1.6;
}

.footer-about-text a,
.footer-bottom a,
.legal-section a:not(.btn) {
    color: #a5b4fc;
    text-decoration: none;
}

.footer-about-text a:hover,
.footer-bottom a:hover,
.legal-section a:not(.btn):hover {
    text-decoration: underline;
}

.footer-website-btn {
    margin-bottom: 10px;
}

.footer-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    word-break: break-all;
}

.footer-email-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.footer-contact-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-study-note {
    color: var(--text-muted);
}

/* Legal / Terms Page */
.legal-page {
    padding: 40px 0 60px;
}

.legal-hero {
    text-align: center;
    padding: 48px 40px;
    margin-bottom: 28px;
}

.legal-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 0.8125rem;
    color: #a5b4fc;
    margin-bottom: 16px;
}

.legal-hero h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.legal-hero > p {
    color: var(--text-secondary);
}

.legal-updated {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.legal-content {
    padding: 40px 48px;
    margin-bottom: 28px;
}

.legal-section {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.legal-section p {
    color: #b8b8c8;
    line-height: 1.8;
    margin-bottom: 12px;
    font-size: 0.9375rem;
}

.legal-section p strong {
    color: var(--text-primary);
}

.legal-section ul {
    margin: 12px 0 12px 24px;
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 0.9375rem;
}

.legal-section a:not(.btn) {
    color: #a5b4fc;
}

.legal-section a:not(.btn):hover {
    color: #c7d2fe;
}

.legal-contact-box {
    text-align: center;
    padding: 28px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    margin-top: 16px;
}

.legal-contact-box p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.legal-contact-box strong {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.legal-contact-note {
    font-size: 0.875rem !important;
    color: var(--text-secondary) !important;
    margin-top: 16px !important;
    margin-bottom: 0 !important;
    line-height: 1.6 !important;
}

.legal-back {
    text-align: center;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .legal-content {
        padding: 28px 20px;
    }

    .legal-hero {
        padding: 32px 20px;
    }
}
