/* ────────────────────────────────────────────────────
   Digital Content Store – Admin CSS
   Modern light theme with clean aesthetics
   ──────────────────────────────────────────────────── */

/* ─── Reset & Variables ─────────────────────────── */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fcfdfe;
    --bg-input: #ffffff;
    --bg-sidebar: #ffffff;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #6366f1;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-accent: #4f46e5;

    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.1);

    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px var(--accent-glow);

    --sidebar-width: 260px;
    --header-height: 72px;

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ─── Layout ────────────────────────────────────── */

.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* ─── Sidebar ───────────────────────────────────── */

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

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

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

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

.nav-item.logout:hover {
    color: var(--error);
    background: var(--error-bg);
}

/* ─── Main Content ──────────────────────────────── */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0; /* Important for flex child to not overflow */
    overflow-x: hidden;
}

.content-header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ─── Mobile Toggle ─────────────────────────────── */

.menu-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    margin-left: -8px;
    margin-right: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.menu-toggle-btn:hover {
    background: var(--bg-primary);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

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

.content-body {
    padding: 32px;
}

/* ─── Cards ─────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 24px;
}

/* ─── Stats ─────────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

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

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

.stat-icon {
    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(99, 102, 241, 0.1);
    color: #818cf8;
}

.stat-icon-green {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

.stat-icon-purple {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
}

.stat-icon-orange {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

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

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 2px;
}

/* ─── Tables ────────────────────────────────────── */

/* ─── Tables ────────────────────────────────────── */

.table-container {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
}

.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

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

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

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.table thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

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

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

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

/* Table Utilities */
.col-id { width: 70px; }
.col-price { width: 100px; }
.col-status { width: 100px; }
.col-date { width: 120px; }
.col-actions { width: 140px; text-align: right; }

.file-path, .url-text {
    display: inline-block;
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    vertical-align: middle;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    background: rgba(113, 113, 122, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.product-name-cell {
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    font-weight: 600;
}

.email-cell {
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    color: var(--text-muted);
}

/* ─── Badges ────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-muted {
    background: rgba(113, 113, 122, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(113, 113, 122, 0.2);
}

/* ─── Buttons ───────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
    color: #fff;
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    color: #fff;
}

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

.btn-full {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box !important;
    justify-content: center;
}

.action-buttons {
    display: flex;
    gap: 4px;
}

/* ─── Forms ─────────────────────────────────────── */

.form {
    max-width: 640px;
}

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

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

.required {
    color: var(--error);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

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

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

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

/* ─── File Upload ───────────────────────────────── */

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    pointer-events: none;
}

.file-upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.file-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: var(--text-accent);
}

.file-name {
    font-size: 14px;
    font-weight: 500;
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    transition: color var(--transition);
    position: relative;
    z-index: 2;
}

.file-remove:hover {
    color: var(--error);
}

/* ─── Alerts ────────────────────────────────────── */

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin: 0 32px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    animation: alertSlideIn 0.3s ease-out;
}

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

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition);
    padding: 0 4px;
}

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

/* ─── Search ────────────────────────────────────── */

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 12px;
    flex: 1;
    max-width: 400px;
    transition: border-color var(--transition);
    color: var(--text-muted);
}

.search-input-wrap:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    outline: none;
}

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

/* ─── Pagination ────────────────────────────────── */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid var(--border);
}

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

/* ─── Detail View ───────────────────────────────── */

.detail-grid {
    display: grid;
    gap: 24px;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.detail-label {
    width: 180px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    padding-top: 2px;
}

.detail-value {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}

.url-text {
    font-size: 12px;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    flex-shrink: 0;
}

/* ─── Modal ─────────────────────────────────────── */

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

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

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: calc(100% - 40px);
    max-width: 640px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

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

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

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

.modal-body {
    padding: 24px;
}

.embed-textarea {
    display: block;
    width: 100%;
    min-height: 200px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.6;
    resize: none;
    outline: none;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: hidden;
    box-sizing: border-box !important;
}

/* ─── Utility ───────────────────────────────────── */

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.file-path {
    font-size: 12px;
    background: var(--bg-input);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ─── Login Page ────────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 0;
    position: relative;
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: orbFloat 20s ease-in-out infinite;
}

.login-bg-orb-1 {
    width: 400px;
    height: 400px;
    background: #6366f1;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.login-bg-orb-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -50px;
    left: -50px;
    animation-delay: -7s;
}

.login-bg-orb-3 {
    width: 250px;
    height: 250px;
    background: #06b6d4;
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.05); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 36px;
    box-shadow: var(--shadow-lg);
}

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

.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.login-form .form-group label {
    font-size: 13px;
}

.login-form .btn {
    margin-top: 8px;
    padding: 14px 20px;
    font-size: 15px;
}

.consent-notice {
    padding: 14px 16px;
    margin: 4px 0 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.consent-notice-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 6px;
}

.consent-notice p + p {
    margin-top: 6px;
}

.consent-check {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
}

.consent-check input {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--accent);
}

/* ─── Public Pages (Success/Cancel/Error) ──────── */

.public-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.public-container {
    width: 100%;
    max-width: 520px;
    padding: 20px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 36px;
    text-align: center;
}

.result-icon {
    margin-bottom: 24px;
}

.success-card .result-icon {
    color: var(--success);
}

.cancel-card .result-icon {
    color: var(--text-muted);
}

.error-card .result-icon {
    color: var(--warning);
}

.result-card h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.result-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
}

/* ─── Responsive ────────────────────────────────── */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content-header {
        padding: 0 20px;
    }

    .content-body {
        padding: 20px;
    }

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

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

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

    .detail-label {
        width: auto;
    }

    .alert {
        margin: 0 20px 12px;
    }

    .result-card {
        padding: 40px 24px;
    }
}

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

/* ─── Landing Page (index.html) ─────────────────── */

.landing-page {
    background: var(--bg-primary);
    overflow-x: hidden;
    color: var(--text-primary);
}

.landing-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.hero {
    padding: 160px 5% 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.05), transparent);
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out;
}

.hero-actions {
    display: flex;
    gap: 16px;
    animation: fadeInUp 1.2s ease-out;
}

.section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-tag {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition);
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.flow-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.flow-item {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    align-items: center;
    text-align: left;
}

.flow-num {
    width: 40px;
    height: 40px;
    background: var(--text-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.flow-content h4 {
    font-weight: 700;
    margin-bottom: 4px;
}

.flow-content p {
    color: var(--text-muted);
    font-size: 14px;
}

.landing-footer {
    padding: 60px 5%;
    background: #fff;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-header {
        padding: 0 16px;
        justify-content: flex-start;
    }
    
    .menu-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .content-body {
        padding: 20px 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .hero {
        padding: 120px 20px 60px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .flow-item {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    .flow-num {
        margin: 0 auto;
    }
}
