/* box.rosinad.com — tokens and drop-zone lifted from the invoicing app
   so the page reads as the same family as invoice.rosinad.com/upload. */

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

:root {
    --red:        #2C9200;
    --on-accent:  #ffffff;
    --dark:       #272727;
    --body:       #4a4a4a;
    --muted:      #666666;
    --muted-2:    #999999;
    --bg:         #ffffff;
    --surface:    #f5f5f5;
    --border:     #e0e0e0;
    --accent-soft:#eef7e9;
    --danger:     #c0392b;
    --danger-soft:#fdecea;
    --radius: 4px;
    --font: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
}

html, body { height: 100%; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--body);
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
}
.header-logo img { height: 32px; display: block; }

.site-main { flex: 1; }

.site-footer {
    padding: 16px 24px;
    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
}

.upload-page, .files-page {
    max-width: 600px;
    margin: 60px auto;
    padding: 0 24px;
}
.files-page { max-width: 860px; }

.upload-page h1, .files-page h1 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--dark);
}
.upload-subtitle {
    color: var(--muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ── Drop zone ─────────────────────────────────────────── */

.drop-zone {
    border: 2px dashed var(--red);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 1rem;
}
.drop-zone:hover, .drop-zone.drag-over { background: var(--accent-soft); }
.drop-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.drop-hint { color: var(--muted-2); font-size: 0.85rem; margin-top: 0.25rem; }

/* ── Upload list ───────────────────────────────────────── */

.upload-list { list-style: none; margin-top: 24px; }

.upload-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.upload-item-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}
.upload-item-name {
    font-weight: 500;
    color: var(--dark);
    word-break: break-all;
    flex: 1;
}
.upload-item-size { color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.upload-item-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.upload-item.done .upload-item-status { color: var(--red); font-weight: 600; }
.upload-item.failed .upload-item-status { color: var(--danger); }

.progress {
    height: 6px;
    background: var(--surface);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0;
    background: var(--red);
    border-radius: 3px;
    transition: width .2s;
}
.upload-item.failed .progress-bar { background: var(--danger); }

/* ── Admin files table ─────────────────────────────────── */

.files-table { width: 100%; border-collapse: collapse; }
.files-table th, .files-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.files-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
    background: var(--surface);
}
.col-day, .col-size, .col-time { white-space: nowrap; color: var(--muted); }

.dbx-ok { color: var(--red); font-weight: 600; }
.dbx-err { color: var(--danger); }

.btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font);
    transition: opacity .15s;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn-primary { background: var(--red); color: var(--on-accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 3px 10px; font-size: 12px; }

.dbx-connect {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 24px;
}
.dbx-form { display: flex; gap: 8px; margin-top: 10px; }
.dbx-form input[type=text] {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 13px;
}
