/* Modern Application & Dashboard Stylesheet */
:root {
    --bg-main: #090d16;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(26, 36, 56, 0.85);
    --bg-header: rgba(10, 15, 29, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(56, 189, 248, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-sub: #64748b;
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-glow: rgba(56, 189, 248, 0.25);
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.2);
    --rose: #f43f5e;
    --purple: #8b5cf6;
    --amber: #f59e0b;
    --orange: #f97316;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-title {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform var(--transition-fast);
}

.brand-logo:hover {
    transform: translateY(-1px);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 0.85rem;
    border-left: 1px solid var(--border-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.logout-btn {
    color: var(--text-sub);
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    color: var(--rose);
    background: rgba(244, 63, 94, 0.1);
}

/* Main Container */
.app-main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    animation: fadeIn 0.3s ease-out;
}

.alert-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fecdd3;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* Dashboard Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

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

.stat-icon-blue { background: rgba(56, 189, 248, 0.12); color: var(--primary); }
.stat-icon-emerald { background: rgba(16, 185, 129, 0.12); color: var(--emerald); }
.stat-icon-purple { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.stat-icon-amber { background: rgba(245, 158, 11, 0.12); color: var(--amber); }

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

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

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0.15rem;
}

.stat-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-sub);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

/* Toolbar & Filters */
.toolbar-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.filter-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.pill:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.pill.active {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--primary);
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}
.pill-dot-pdf { background: var(--rose); }
.pill-dot-image { background: var(--primary); }
.pill-dot-video { background: var(--emerald); }
.pill-dot-docx { background: var(--purple); }
.pill-dot-pptx { background: var(--orange); }
.pill-dot-doc { background: var(--text-muted); }

.pill-count {
    font-size: 0.7rem;
    padding: 1px 5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-full);
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.search-form {
    position: relative;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap svg {
    position: absolute;
    left: 0.85rem;
    color: var(--text-sub);
    pointer-events: none;
}

.search-input {
    width: 240px;
    padding: 0.5rem 2rem 0.5rem 2.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-main);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    width: 280px;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    color: var(--text-sub);
    font-size: 1.1rem;
    line-height: 1;
}

.search-clear:hover {
    color: var(--text-main);
}

.view-switch-group {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2px;
}

.view-switch-btn {
    background: none;
    border: none;
    color: var(--text-sub);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.view-switch-btn:hover {
    color: var(--text-main);
}

.view-switch-btn.active {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f172a;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.btn-ghost-sm:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Media Cards Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.media-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-soft);
}

.media-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.1);
}

.card-preview-area {
    height: 130px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-bottom: 1px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-type-watermark {
    position: absolute;
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    letter-spacing: 0.05em;
    user-select: none;
    pointer-events: none;
}

.card-icon-center {
    z-index: 2;
    transition: transform var(--transition-fast);
}

.media-card:hover .card-icon-center {
    transform: scale(1.1);
}

.card-badge-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-type {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-pdf { background: rgba(244, 63, 94, 0.18); color: var(--rose); border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-image { background: rgba(56, 189, 248, 0.18); color: var(--primary); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-video { background: rgba(16, 185, 129, 0.18); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-docx { background: rgba(139, 92, 246, 0.18); color: var(--purple); border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-pptx { background: rgba(249, 115, 22, 0.18); color: var(--orange); border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-document { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.3); }

.badge-views {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.card-body {
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.775rem;
    color: var(--text-sub);
    margin-bottom: 0.85rem;
}

.card-filename {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Clean URL Box */
.clean-url-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.45rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.clean-url-text {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-prefix {
    color: var(--text-sub);
}

.url-slug {
    color: var(--primary);
    font-weight: 600;
}

.btn-copy-url {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--primary);
    font-size: 0.725rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.btn-copy-url:hover {
    background: var(--primary);
    color: #0f172a;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-card-view {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.45rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-card-view:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-card-share, .btn-card-delete {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-card-share:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
}

.btn-card-delete:hover {
    color: var(--rose);
    border-color: var(--rose);
    background: rgba(244, 63, 94, 0.1);
}

/* List Table Mode */
.media-list-table-wrap {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.media-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.media-table th {
    padding: 0.85rem 1rem;
    color: var(--text-sub);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.725rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.media-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.table-title {
    font-weight: 600;
    color: var(--text-main);
}

.table-sub {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.table-link-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.clean-url-code {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.75rem;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-copy-sm {
    background: rgba(56, 189, 248, 0.12);
    border: none;
    color: var(--primary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    cursor: pointer;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.btn-table-view {
    padding: 3px 8px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
}

.btn-table-delete {
    padding: 2px 6px;
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 1.1rem;
    cursor: pointer;
}

.btn-table-delete:hover {
    color: var(--rose);
}

/* Empty State */
.empty-state-card {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
}

.empty-state-icon {
    color: var(--text-sub);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Modal Overlay & Dialog */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: slideUp 0.25s ease-out;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close-btn:hover {
    color: #ffffff;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Dropzone */
.dropzone {
    border: 2px dashed rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.03);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dropzone:hover, .dropzone.drag-over {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.08);
    transform: scale(1.01);
}

.dropzone-icon {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.dropzone-text {
    font-size: 0.925rem;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.dropzone-formats {
    font-size: 0.75rem;
    color: var(--text-sub);
}

.file-preview-wrap {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-filename {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.preview-filesize {
    font-size: 0.75rem;
    color: var(--text-sub);
    margin-left: 0.5rem;
}

.preview-remove-btn {
    background: none;
    border: none;
    color: var(--rose);
    font-size: 1.25rem;
    cursor: pointer;
}

/* Progress bar */
.progress-wrap {
    margin-top: 1rem;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--emerald));
    transition: width 0.2s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

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

.input-copy-group {
    display: flex;
    gap: 0.5rem;
}

.clean-link-copy-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.upload-success-box {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.3s ease;
}

.success-icon-badge {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald);
    border: 2px solid var(--emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem auto;
}

/* Login Page Styles */
.login-page {
    background: radial-gradient(circle at 50% 20%, #1e293b 0%, #090d16 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-bg-glow {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(40px);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
    z-index: 10;
}

.login-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(56, 189, 248, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.login-subtitle {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--text-sub);
    pointer-events: none;
}

.input-wrap .form-input {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.btn-toggle-pwd {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.btn-toggle-pwd:hover {
    color: var(--text-main);
}

.btn-login {
    height: 46px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0f172a;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
    transition: all var(--transition-fast);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.login-footer {
    margin-top: 1.75rem;
    text-align: center;
}

.login-badge-env {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.725rem;
    color: var(--text-sub);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.status-pulse {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-header);
    padding: 1.25rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-sub);
}

.footer-brand {
    color: var(--text-main);
    font-weight: 600;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--emerald);
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    animation: slideInRight 0.25s ease-out;
}

.toast-success { border-left: 4px solid var(--emerald); }
.toast-error { border-left: 4px solid var(--rose); }

/* QR Code Container */
.qrcode-wrap {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

/* Utilities */
.hidden { display: none !important; }
.text-right { text-align: right; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: monospace; }
.text-emerald-400 { color: var(--emerald); }

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .header-nav { width: 100%; justify-content: space-between; }
    .toolbar-section { flex-direction: column; align-items: stretch; }
    .toolbar-controls { margin-left: 0; width: 100%; justify-content: space-between; }
    .search-input { width: 100%; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
