@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
    --bg: #0f0f0f;
    --bg-surface: #161616;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --text-dim: rgba(255, 255, 255, 0.25);
    --accent: #ff6b2b;
    --accent-hover: #ff8c55;
    --accent-dim: rgba(255, 107, 43, 0.12);
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --platform-youtube: #ff0000;
    --platform-tiktok: #ffffff;
    --platform-instagram: #e1306c;
    --platform-x: #ffffff;
    --platform-twitter: #1da1f2;
    --platform-linkedin: #0077b5;
    --platform-facebook: #1877f2;
}

html {
    font-size: 16px;
}

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

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

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

/* === LAYOUT === */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === HEADER === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    padding-top: 16px;
    padding-bottom: 16px;
}

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

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    height: 40px;
    width: auto;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}

/* === FOOTER === */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 64px;
    text-align: center;
}

.site-footer small {
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* === SEARCH SECTION === */
.search-section {
    padding: 48px 0 24px;
}

.search-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.search-section .subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 32px;
}

/* === SEARCH FORM === */
#search-form {
    margin-bottom: 0;
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
}

.search-grid input[type="search"],
.search-grid select {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.875rem;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    height: 48px;
}

.search-grid input[type="search"]:focus,
.search-grid select:focus {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.search-grid input[type="search"]::placeholder {
    color: var(--text-dim);
}

.search-grid select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.search-grid select option {
    background: var(--bg-surface);
    color: var(--text);
}

/* === TAG CLOUD === */
.tag-cloud-section {
    padding: 24px 0 16px;
}

.tag-cloud-section h4 {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: calc(0.75rem + var(--tag-weight, 1) * 0.04rem);
    font-weight: 500;
    opacity: calc(0.6 + var(--tag-weight, 1) * 0.08);
    transition: all 0.2s ease;
    text-decoration: none;
}

.tag-cloud-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    color: var(--text);
}

.tag-category {
    margin-bottom: 20px;
}

.tag-category-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

/* === DIVIDER === */
.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

/* === RESULTS === */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* === SUMMARY CARDS === */
.summary-card {
    background: transparent;
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
}

.summary-card:hover {
    background: rgba(255, 255, 255, 0.03);
}

.summary-card .card-content {
    display: flex;
    gap: 20px;
}

.summary-card .card-thumbnail {
    flex-shrink: 0;
    width: 180px;
    height: 100px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    display: block;
    transition: opacity 0.2s;
}

.summary-card .card-thumbnail:hover {
    opacity: 0.85;
}

.summary-card .card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-card .card-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--border);
}

.summary-card .card-thumbnail.no-image img {
    display: none;
}

.summary-card .card-thumbnail.no-image::after {
    content: "\1F4F7";
}

.summary-card .card-thumbnail.no-image[data-platform="instagram"]::after {
    content: "\1F4F7";
}

.summary-card .card-thumbnail.no-image[data-platform="tiktok"]::after {
    content: "\1F3B5";
}

.summary-card .card-thumbnail.no-image[data-platform="youtube"]::after {
    content: "\25B6\FE0F";
}

.summary-card .card-thumbnail.no-image[data-platform="x"]::after {
    content: "\1D54F";
}

.summary-card .card-body {
    flex: 1;
    min-width: 0;
}

.summary-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    letter-spacing: -0.01em;
}

.summary-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 8px;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.platform-youtube { background: var(--platform-youtube); color: white; }
.platform-tiktok { background: var(--platform-tiktok); color: #0f0f0f; }
.platform-instagram { background: var(--platform-instagram); color: white; }
.platform-x { background: var(--platform-x); color: #0f0f0f; }
.platform-twitter { background: var(--platform-twitter); color: white; }
.platform-linkedin { background: var(--platform-linkedin); color: white; }
.platform-facebook { background: var(--platform-facebook); color: white; }

.type-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

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

.author {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.summary-preview {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-top: 8px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === NO RESULTS === */
.no-results {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.no-results p {
    margin-bottom: 8px;
}

/* === LOAD MORE === */
.load-more {
    text-align: center;
    padding: 32px 0;
}

.load-more button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.load-more button:hover,
.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    font-weight: 600;
}

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

.btn-danger {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    font-weight: 600;
}

.btn-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* === DETAIL PAGE === */
.detail-header {
    padding: 32px 0 16px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.8125rem;
}

.breadcrumb a {
    color: var(--text-muted);
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--text);
}

.breadcrumb .separator {
    color: var(--text-dim);
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.detail-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.3;
    margin-top: 16px;
    margin-bottom: 4px;
}

.thumbnail {
    max-width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.summary-content {
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: var(--accent-dim);
    border: 1px solid rgba(255, 107, 43, 0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
}

.raw-content {
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.raw-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-family: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
}

details {
    margin-top: 24px;
}

details summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s;
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: "+ ";
    font-weight: 400;
}

details[open] summary::before {
    content: "- ";
}

details summary:hover {
    color: var(--text);
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 32px 0 16px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.pagination-btn.disabled {
    color: var(--text-dim);
    pointer-events: none;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-num:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.pagination-num.active {
    background: var(--accent);
    color: white;
}

.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-dim);
    font-size: 0.8125rem;
}

/* === FOOTER === */
.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    color: var(--text-dim);
    transition: color 0.2s;
}

.footer-social:hover {
    color: #0077b5;
}

/* === HTMX === */
.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-indicator {
    display: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .site-header .container {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .brand-logo {
        height: 32px;
    }

    .search-section {
        padding: 32px 0 16px;
    }

    .search-section h1 {
        font-size: 1.75rem;
    }

    .search-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .search-grid input[type="search"],
    .search-grid select {
        height: 44px;
    }

    .summary-card {
        padding: 16px;
    }

    .summary-card .card-content {
        flex-direction: column;
        gap: 12px;
    }

    .summary-card .card-thumbnail {
        width: 100%;
        height: 200px;
    }

    .summary-meta {
        gap: 6px;
    }

    .detail-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .detail-card h2 {
        font-size: 1.25rem;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .btn {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 24px 0 12px;
    }

    .search-section h1 {
        font-size: 1.5rem;
    }

    .summary-card {
        padding: 12px;
    }

    .tag-cloud {
        gap: 6px;
    }

    .tag-cloud-item {
        padding: 4px 10px;
        font-size: 0.6875rem;
    }
}

/* === CRAWL PAGE === */
.crawl-form .search-grid {
    grid-template-columns: 1fr 100px auto;
}

.crawl-form input[type="number"] {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.875rem;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    height: 48px;
    text-align: center;
}

.crawl-form input[type="number"]:focus {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.crawl-form input[type="url"] {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.875rem;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    height: 48px;
}

.crawl-form input[type="url"]:focus {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.crawl-form input[type="url"]::placeholder {
    color: var(--text-dim);
}

.crawl-status {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.crawl-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.crawl-results-section {
    padding: 24px 0;
}

.crawl-results-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

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

.crawl-results-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
}

.crawl-results-table td {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.crawl-results-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.crawl-results-table td a {
    color: var(--accent);
    font-weight: 500;
}

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

.crawl-error {
    padding: 24px;
    margin-top: 24px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-md);
    color: #ef4444;
    font-size: 0.875rem;
}

/* === CRAWL JOB CARDS === */
.crawl-job {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-top: 16px;
    transition: border-color 0.3s;
}

.crawl-job.running {
    border-color: var(--accent);
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--accent); }
    50% { border-color: rgba(255, 107, 43, 0.3); }
}

.crawl-job-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.crawl-job-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crawl-job-domain {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

.crawl-job-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.crawl-job-empty {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-running {
    background: rgba(255, 107, 43, 0.15);
    color: var(--accent);
}

.status-done {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-error {
    background: rgba(220, 38, 38, 0.15);
    color: #ef4444;
}

.crawl-spinner-sm {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(255, 107, 43, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.crawl-job details {
    margin-top: 12px;
}

.crawl-job .crawl-results-table {
    margin-top: 8px;
}

.crawl-job .crawl-error {
    margin-top: 12px;
}

.crawl-actions-cell {
    display: flex;
    gap: 10px;
    align-items: center;
}

.copy-link-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-link-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: var(--text);
}

.copy-link-btn.copied {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

@media (max-width: 768px) {
    .crawl-form .search-grid {
        grid-template-columns: 1fr;
    }

    .crawl-job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* === LOGIN PAGE === */
.login-page {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.login-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.login-inline {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 480px;
    padding: 0 24px;
}

.login-input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.login-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.login-btn {
    padding: 14px 28px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.login-error {
    padding: 10px 16px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-sm);
    color: #ef4444;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Logout link in nav */
.nav-logout {
    color: var(--text-muted) !important;
    font-size: 0.8125rem !important;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}

.nav-logout:hover {
    opacity: 1;
    color: var(--text) !important;
}

@media (max-width: 480px) {
    .login-inline {
        flex-direction: column;
        padding: 0 16px;
    }

    .login-inline .login-input,
    .login-inline .login-btn {
        width: 100%;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === VOICE MEMOS === */
.memo-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.memo-upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(255, 107, 43, 0.05);
}

.memo-upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.memo-upload-zone p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.memo-upload-zone .upload-or {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin: 8px 0;
}

.memo-upload-zone .upload-hint {
    color: var(--accent);
    font-weight: 500;
    margin-top: 8px;
}

.upload-label {
    cursor: pointer;
}

.upload-estimate {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 8px;
    text-align: center;
}

.memo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-top: 16px;
}

.memo-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.memo-toggle {
    cursor: pointer;
    user-select: none;
}

.memo-toggle:hover {
    opacity: 0.8;
}

.memo-chevron {
    font-size: 0.7rem;
    margin-right: 6px;
    display: inline-block;
    color: var(--text-muted);
}

.memo-body {
    padding-top: 12px;
}

.memo-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.memo-status-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.memo-filename {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

.memo-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-top: 12px;
}

.memo-summary-full {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.7;
}

.memo-summary-full h4 {
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 16px;
    margin-bottom: 6px;
}

.memo-summary-full h4:first-child {
    margin-top: 0;
}

.memo-summary-full ul {
    padding-left: 20px;
    margin: 4px 0;
}

.memo-summary-full li {
    margin-bottom: 4px;
}

.memo-card-actions {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .memo-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .memo-upload-zone {
        padding: 32px 16px;
    }
}
