/* ============================================
   SafeShare — Main Stylesheet (Desktop-First)
   ============================================ */

/* ---- CSS Variables (Theme Tokens) ---- */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f8ff;
    --bg-tertiary: #eef2ff;
    --accent: #2563eb;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #1e3a8a);
    --accent-hover: #1d4ed8;
    --accent-light: #dbeafe;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

input, select, textarea {
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition);
}

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

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

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

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

.hidden {
    display: none !important;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

.btn-links {
    background: #0f766e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.22);
}

.btn-links:hover {
    background: #115e59;
    transform: translateY(-1px);
}

.btn-version {
    background: #7c3aed;
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.22);
}

.btn-version:hover {
    background: #6d28d9;
    transform: translateY(-1px);
}

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

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

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

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

.forgot-password-link {
    margin: -6px 0 8px auto;
    padding-right: 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

/* ---- Google Button ---- */
.btn-google {
    background: #fff;
    color: #333;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: var(--shadow-sm);
}

.btn-google svg {
    width: 18px;
    height: 18px;
}

/* ---- Form Elements ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

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

.form-error.visible {
    display: block;
}

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

.form-row .form-group {
    flex: 1;
}

/* Toggle switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle:checked {
    background: var(--accent);
}

.toggle:checked::before {
    transform: translateX(20px);
}

/* ---- Cards ---- */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

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

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ---- Modal/Popup ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s ease;
    padding: 32px;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

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

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.modal-close:hover {
    background: var(--danger);
    color: #fff;
}

.modal-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.modal-alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.modal-alert.error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    display: block;
}

.modal-alert.success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #bbf7d0;
    display: block;
}

/* ---- Navbar ---- */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-brand img {
    height: 38px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.navbar-user .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ---- Landing Page ---- */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.landing-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.landing-page::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

.landing-logo {
    width: 200px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease;
}

.landing-tagline {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 400px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.landing-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.landing-buttons .btn {
    min-width: 160px;
    padding: 14px 32px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.landing-page {
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 78% 18%, rgba(59, 130, 246, 0.14), transparent 34%),
        radial-gradient(circle at 22% 86%, rgba(14, 165, 233, 0.12), transparent 30%),
        linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
}

.landing-page::before,
.landing-page::after {
    display: none;
}

.landing-nav {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
}

.landing-brand img {
    height: 58px;
    width: auto;
}

.logo-mobile {
    display: none;
}

.landing-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0 30px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    gap: 58px;
    align-items: center;
    min-height: 500px;
}

.landing-copy {
    max-width: 470px;
}

.landing-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #2563eb;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 22px;
}

.landing-copy h1 {
    font-size: clamp(52px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: 0;
    color: #071735;
    margin-bottom: 24px;
}

.landing-copy h1 span {
    color: #2563eb;
    display: block;
}

.landing-tagline {
    text-align: left;
    max-width: 460px;
    margin: 0 0 28px;
    font-size: 17px;
    line-height: 1.65;
    color: #42526e;
}

.landing-buttons {
    justify-content: flex-start;
    gap: 16px;
}

.landing-buttons .btn {
    min-width: 176px;
}

.landing-button-notes {
    display: grid;
    grid-template-columns: repeat(2, 176px);
    gap: 16px;
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.landing-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 384px;
    margin: 28px 0 18px;
    color: #64748b;
    font-size: 13px;
}

.landing-divider::before,
.landing-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dbe5f2;
}

.landing-google {
    width: 388px;
    height: 48px;
    justify-content: center;
    border-radius: var(--radius-md);
    color: #41506b;
    font-weight: 700;
}

.landing-visual {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-emblem {
    width: min(420px, 72vw);
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.13) 0%, rgba(37, 99, 235, 0.05) 46%, transparent 67%);
    box-shadow: inset 0 -32px 60px rgba(37, 99, 235, 0.08);
}

.hero-emblem::after {
    content: '';
    position: absolute;
    width: min(420px, 72vw);
    height: 54px;
    bottom: 72px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    filter: blur(18px);
}

.hero-emblem img {
    position: relative;
    z-index: 1;
    width: min(330px, 54vw);
    border-radius: 28%;
    clip-path: inset(2px round 28%);
    filter: drop-shadow(0 28px 34px rgba(37, 99, 235, 0.35));
}

.hero-card {
    position: absolute;
    z-index: 2;
    min-width: 160px;
    padding: 16px 18px;
    border: 1px solid rgba(219, 229, 242, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(30, 64, 175, 0.12);
    color: #334155;
    backdrop-filter: blur(10px);
}

.hero-card strong,
.hero-card span {
    display: block;
}

.hero-card strong {
    font-size: 12px;
    margin-bottom: 10px;
}

.hero-card span {
    color: #2563eb;
    font-weight: 700;
    font-size: 13px;
}

.hero-card-password {
    left: 2%;
    top: 16%;
}

.hero-card-expiry {
    right: 2%;
    top: 18%;
}

.hero-card-tracking {
    left: 0;
    bottom: 24%;
}

.hero-card-sharing {
    right: 0;
    bottom: 22%;
}

.mini-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 34px;
    width: 112px;
}

.mini-chart-bars .bar {
    flex: 1;
    background: #2563eb;
    border-radius: 4px 4px 0 0;
}

.mini-chart-bars .bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.mini-chart-bars .bar:nth-child(2) { height: 70%; animation-delay: 0.3s; }
.mini-chart-bars .bar:nth-child(3) { height: 100%; animation-delay: 0.5s; background: #3b82f6; }
.mini-chart-bars .bar:nth-child(4) { height: 50%; animation-delay: 0.2s; }
.mini-chart-bars .bar:nth-child(5) { height: 80%; animation-delay: 0.4s; }

@keyframes trackingBounce {
    0% { transform: scaleY(0.7); transform-origin: bottom; }
    100% { transform: scaleY(1.1); transform-origin: bottom; }
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 24px;
    padding: 26px;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.landing-feature {
    display: grid;
    grid-template-columns: 58px 1fr;
    column-gap: 16px;
    padding: 6px 22px;
    border-right: 1px solid #e2e8f0;
}

.landing-feature:last-child {
    border-right: 0;
}

.landing-feature .feature-icon {
    grid-row: span 2;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
}

.landing-feature strong {
    color: #071735;
    font-size: 14px;
    margin-bottom: 6px;
}

.landing-feature p {
    color: #52627a;
    font-size: 13px;
    line-height: 1.5;
}

.landing-stats {
    display: grid;
    grid-template-columns: 1.8fr repeat(4, 1fr);
    gap: 0;
    align-items: center;
    margin-top: 22px;
    padding: 30px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #0f4cc7 0%, #0b38a3 100%);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.landing-stats > div {
    padding: 0 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.landing-stats > div:last-child {
    border-right: 0;
}

.landing-stat-intro {
    font-size: 14px;
    line-height: 1.65;
    font-weight: 600;
}

.landing-stats strong,
.landing-stats span {
    display: block;
    text-align: center;
}

.landing-stats strong {
    font-size: 28px;
    margin-bottom: 6px;
}

.landing-stats span {
    font-size: 13px;
}

.landing-privacy {
    margin: 24px 0 0;
    text-align: center;
    color: #52627a;
    font-size: 14px;
    font-weight: 600;
}

/* ---- Dashboard ---- */
.dashboard-content {
    padding: 24px 0;
}

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

.dashboard-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.dashboard-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Search & Upload Bar ---- */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-primary);
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* ---- File Table ---- */
.file-table-wrapper {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.file-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.file-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

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

.file-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.file-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.file-icon.pdf {
    background: #fef2f2;
    color: var(--danger);
}

.file-icon.image {
    background: #f0fdf4;
    color: var(--success);
}

.file-icon.docx {
    background: var(--accent-light);
    color: var(--accent);
}

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

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

.file-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
    gap: 8px;
    max-width: 240px;
}

.file-actions .btn {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
}

/* ---- Version Badge ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

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

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

.badge-revoked {
    background: #fef2f2;
    color: var(--danger);
}

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

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

.pagination button {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pagination button:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

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

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

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

/* ---- Share Link Section ---- */
.share-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.share-link-box input {
    flex: 1;
    background: none;
    border: none;
    font-size: 13px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.share-link-box input:focus {
    box-shadow: none;
}

.copy-feedback {
    font-size: 12px;
    color: var(--success);
    display: none;
}

.copy-feedback.visible {
    display: inline;
    animation: fadeIn 0.2s ease;
}

/* ---- QR Code ---- */
.qr-container {
    text-align: center;
    padding: 20px;
}

.qr-container img {
    width: 200px;
    height: 200px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    background: #fff;
}

/* ---- Version History Panel ---- */
.version-list {
    list-style: none;
}

.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.version-item:hover {
    background: var(--bg-tertiary);
}

.version-item:last-child {
    border-bottom: none;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.version-number {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
}

.version-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.version-actions {
    display: flex;
    gap: 6px;
}

.version-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* ---- Access Logs Table ---- */
.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.logs-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.logs-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
}

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

/* ---- Public Share Page ---- */
.share-page {
    min-height: 100vh;
    background: var(--bg-secondary);
}

.share-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 24px;
}

.share-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.share-card-header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.share-card-header img {
    height: 36px;
    margin-bottom: 16px;
}

.share-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.share-card-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.share-status {
    text-align: center;
    padding: 40px 20px;
}

.share-status .status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.share-status .status-icon.error {
    background: #fef2f2;
    color: var(--danger);
}

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

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

.share-status h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.share-status p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Preview area */
.preview-area {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
}

.preview-area iframe {
    width: 100%;
    height: 720px;
    border: none;
    display: block;
}

body.preview-lock {
    overflow: hidden;
}

.preview-area.preview-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    margin: 0;
    border: none;
    border-radius: 0;
    background: var(--bg-primary);
}

.preview-area.preview-fullscreen iframe {
    height: calc(100vh - 57px);
}

.image-preview-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    background: var(--bg-secondary);
}

.preview-area img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.image-preview-frame img {
    width: auto;
    max-width: 100%;
    max-height: 680px;
}

.preview-area.preview-fullscreen .image-preview-frame {
    height: calc(100vh - 57px);
    min-height: 0;
}

.preview-area.preview-fullscreen .image-preview-frame img {
    max-width: 100vw;
    max-height: calc(100vh - 57px);
}

.no-preview {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.download-section {
    text-align: center;
    padding-top: 8px;
}

.download-section .btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

/* ---- Password Section ---- */
.password-section {
    max-width: 340px;
    margin: 0 auto;
    text-align: center;
}

.password-section .lock-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.password-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.password-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ---- Upload Area ---- */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.upload-area .upload-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 12px;
}

.upload-area h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-area p {
    font-size: 13px;
    color: var(--text-muted);
}

.upload-progress {
    margin-top: 12px;
    display: none;
}

.upload-progress.active {
    display: block;
}

.progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

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

/* ---- Share Link Row (in share links list) ---- */
.link-item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    background: var(--bg-primary);
    transition: var(--transition);
}

.link-item:hover {
    box-shadow: var(--shadow-md);
}

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

.link-item-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.link-item-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.link-item-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

/* ---- Empty State ---- */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state .empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 320px;
    margin: 0 auto;
}

/* ---- Toast Notification ---- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--accent);
}

/* ---- Spinner ---- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--accent);
}

/* ---- Confirm Dialog ---- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.confirm-dialog {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.confirm-overlay.active .confirm-dialog {
    transform: scale(1);
}

.confirm-dialog h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.confirm-dialog p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.confirm-dialog .confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.tab:hover {
    color: var(--accent);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

/* Row animation */
.file-table tbody tr {
    animation: fadeIn 0.3s ease;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Wide modal variant (for share link creation) */
.modal.modal-wide {
    max-width: 560px;
}

/* File size formatter */
.file-size {
    color: var(--text-muted);
    font-size: 13px;
}
