/* muratcard — dark spreadsheet theme */

:root {
    --bg:        #14161b;
    --bg-soft:   #1c1f27;
    --surface:   #21252f;
    --line:      #313644;
    --line-soft: #272c37;
    --ink:       #eef1f6;
    --ink-dim:   #9aa3b2;
    --gold:      #d8a43b;
    --gold-soft: #f0cd84;
    --row-alt:   #1a1d25;
    --danger:    #d65b5b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: radial-gradient(120% 80% at 50% -10%, #1b1f29 0%, var(--bg) 60%);
    color: var(--ink);
    font: 15px/1.5 ui-sans-serif, "Segoe UI", Helvetica, Arial, sans-serif;
    min-height: 100vh;
}

/* Masthead */
.masthead {
    text-align: center;
    padding: 2.2rem 1rem 1.4rem;
    border-bottom: 1px solid var(--line);
}
.wordmark {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
}
.wordmark span { color: var(--gold); }

.nav {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.6rem;
}
.nav a {
    color: var(--ink-dim);
    text-decoration: none;
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding-bottom: .35rem;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--gold); border-bottom-color: var(--gold); }

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.6rem 1.2rem 4rem;
}

/* Flash */
.flash {
    padding: .8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    font-size: .95rem;
    border: 1px solid transparent;
}
.flash--ok    { background: #16291f; border-color: #2f5a41; color: #b9e9cd; }
.flash--error { background: #2b1819; border-color: #6a3334; color: #f3c4c4; }

/* Add-card panel */
.panel {
    background: linear-gradient(180deg, var(--surface), var(--bg-soft));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.3rem;
    margin-bottom: 1.6rem;
}
.panel__title {
    margin: 0 0 1rem;
    font-size: .92rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold-soft);
}
.addform__slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.slot {
    display: block;
    background: var(--bg);
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.slot:hover { border-color: var(--gold); background: #181b22; }
.slot__label {
    display: block;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: .6rem;
}
.slot__label em { font-style: normal; color: var(--gold); font-size: .72rem; margin-left: .3rem; }
.slot input[type=file] { width: 100%; color: var(--ink-dim); font-size: .85rem; }
.slot--wide { margin-bottom: 1rem; }

/* Bulk upload results */
.results { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.res {
    padding: .5rem .8rem;
    border-radius: 8px;
    margin-bottom: .4rem;
    font-size: .9rem;
    border: 1px solid var(--line-soft);
    background: var(--bg);
}
.res--pending { color: var(--ink-dim); }
.res--ok  { color: #b9e9cd; border-color: #2f5a41; }
.res--err { color: #f3c4c4; border-color: #6a3334; }
.res--done {
    margin-top: .8rem;
    background: transparent;
    border: 0;
    color: var(--gold-soft);
    font-weight: 600;
}
.res--done a { color: var(--gold); text-decoration: none; }
.res--done a:hover { text-decoration: underline; }

.btn {
    background: var(--gold);
    color: #2a1d05;
    border: 0;
    border-radius: 10px;
    padding: .7rem 1.4rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.btn:hover  { background: var(--gold-soft); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--gold); background: #181b22; }
.addform__hint { margin: .9rem 0 0; color: var(--ink-dim); font-size: .82rem; }

/* Toolbar: search + count */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.search { display: flex; align-items: center; gap: .5rem; flex: 1 1 320px; }
.search input[type=search] {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .65rem .85rem;
    color: var(--ink);
    font-size: .95rem;
}
.search input[type=search]:focus { outline: none; border-color: var(--gold); }
.search .clear { color: var(--ink-dim); font-size: .85rem; text-decoration: none; }
.search .clear:hover { color: var(--gold); }
.count {
    color: var(--ink-dim);
    font-size: .82rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.empty { color: var(--ink-dim); text-align: center; padding: 3rem 0; }

/* Spreadsheet */
.tablewrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.sheet {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    white-space: nowrap;
}
.sheet thead th {
    position: sticky;
    top: 0;
    background: var(--bg-soft);
    text-align: left;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--line);
    font-size: .76rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-dim);
}
.sheet thead th a { color: inherit; text-decoration: none; }
.sheet thead th a:hover { color: var(--gold); }
.sheet tbody td {
    padding: .6rem .85rem;
    border-bottom: 1px solid var(--line-soft);
}
.sheet tbody tr:nth-child(even) { background: var(--row-alt); }
.sheet tbody tr:hover { background: #232733; }
.sheet .num   { text-align: right; font-variant-numeric: tabular-nums; }
.sheet .strong { font-weight: 600; color: var(--ink); }
.sheet .nil   { color: #4d5564; }

.rowdel { width: 1%; text-align: center; }
.rowdel button {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: #4d5564;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.rowdel button:hover { background: var(--danger); color: #fff; }

.footer {
    text-align: center;
    color: var(--ink-dim);
    font-size: .78rem;
    padding: 2rem 1rem;
    border-top: 1px solid var(--line);
}

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