@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Condensed:wght@400;500;700&display=swap');

:root {
    --brand: #63B753;
    --brand-dark: #4e9a40;
    --brand-darker: #3d7d32;
    --brand-tint: #eef7ec;
    --bg: #f4f7f3;
    --surface: #ffffff;
    --surface-2: #f6f8f5;
    --border: #e3e9e0;
    --border-strong: #d2dccd;
    --text: #2e3330;
    --text-muted: #6b7470;
    --danger: #c0392b;
    --success: #4e9a40;
    --warning: #c77f0a;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(33,46,30,0.04), 0 4px 14px rgba(33,46,30,0.05);
    --shadow-lg: 0 6px 28px rgba(33,46,30,0.10);
    --font: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-cond: 'Roboto Condensed', 'Roboto', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-cond); }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand-darker); text-decoration: underline; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
    background: var(--surface);
    color: var(--text);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-lockup img { height: 34px; width: auto; display: block; }
.brand-lockup .brand-name {
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.02em;
    color: var(--text);
    line-height: 1;
}
.brand-lockup .brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 2px;
}

.app-header nav { display: flex; gap: 6px; align-items: center; }
.app-header nav .user-chip {
    font-size: 13px; color: var(--text-muted); margin-right: 8px;
    font-family: var(--font-cond); letter-spacing: 0.02em;
}
.app-header nav a, .app-header nav button {
    color: var(--text); background: transparent; border: none; cursor: pointer;
    font-family: var(--font-cond); font-size: 14px; font-weight: 500;
    padding: 7px 12px; border-radius: var(--radius-sm); transition: background 0.15s, color 0.15s;
}
.app-header nav a:hover, .app-header nav button:hover {
    background: var(--brand-tint); color: var(--brand-darker); text-decoration: none;
}
.app-header nav a.active { background: var(--brand); color: #fff; }
.app-header nav a.active:hover { background: var(--brand-dark); color: #fff; }

.app-main { flex: 1; padding: 28px 24px; max-width: 1180px; margin: 0 auto; width: 100%; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.card h2 { margin: 0 0 14px 0; font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.card h3 { margin: 18px 0 10px 0; font-size: 16px; font-weight: 700; color: var(--text); }

.form-row { margin-bottom: 16px; }
.form-row label {
    display: block; font-family: var(--font-cond); font-size: 12px; font-weight: 700;
    color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], select, textarea {
    width: 100%; padding: 10px 12px; font-size: 15px; font-family: var(--font);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,183,83,0.18);
}
textarea { min-height: 64px; resize: vertical; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-group label {
    display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; background: var(--surface);
    text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--text); margin: 0;
    transition: all 0.15s;
}
.checkbox-group label:hover { border-color: var(--brand); }
.checkbox-group label:has(input:checked) { background: var(--brand); color: white; border-color: var(--brand); }
.checkbox-group input { margin-right: 8px; accent-color: var(--brand); }

button.btn {
    padding: 10px 20px; font-size: 15px; font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.02em;
    background: var(--brand); color: white; border: none; border-radius: var(--radius-sm);
    cursor: pointer; transition: background 0.15s, transform 0.05s; box-shadow: 0 1px 2px rgba(78,154,64,0.25);
}
button.btn:hover { background: var(--brand-dark); }
button.btn:active { transform: translateY(1px); }
button.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

button.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
button.btn-secondary:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand-darker); }
button.btn-danger { background: var(--danger); box-shadow: none; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th {
    font-family: var(--font-cond); font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; font-size: 12px; letter-spacing: 0.07em; background: var(--surface-2);
}
.table tbody tr:hover { background: var(--brand-tint); }

.badge {
    display: inline-block; padding: 3px 10px; font-family: var(--font-cond); font-size: 12px; font-weight: 700;
    border-radius: 20px; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-draft { background: #eceeec; color: #5b635b; }
.badge-uploading { background: #fef3c7; color: #92400e; }
.badge-queued { background: #dbeafe; color: #1e40af; }
.badge-processing { background: #fde68a; color: #92400e; }
.badge-completed { background: var(--brand-tint); color: var(--brand-darker); }
.badge-failed { background: #fde2e0; color: #991b1b; }
.badge-cancelled { background: #e5e7eb; color: #4b5563; }
.badge-active { background: var(--brand-tint); color: var(--brand-darker); }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-disabled { background: #e5e7eb; color: #4b5563; }

.flex-row { display: flex; gap: 10px; align-items: center; }
.spacer { flex: 1; }
.muted { color: var(--text-muted); font-size: 13px; }

/* ---- Login ---- */
.login-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: linear-gradient(160deg, #f4f7f3 0%, #eef7ec 100%);
}
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow-lg); padding: 38px 34px; }
.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 26px; }
.login-logo img { height: 72px; width: auto; margin-bottom: 14px; }
.login-card h1 { margin: 0; font-size: 25px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.login-card .tagline { margin: 6px 0 0 0; color: var(--text-muted); font-size: 14px; text-align: center; }
.login-card .form-row { margin-bottom: 16px; }
.login-card button.btn { width: 100%; padding: 12px; font-size: 16px; margin-top: 4px; }

.alert { padding: 11px 15px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; }
.alert-error { background: #fde2e0; color: #991b1b; }
.alert-success { background: var(--brand-tint); color: var(--brand-darker); }
.alert-info { background: #dbeafe; color: #1e40af; }

.progress { height: 8px; background: #e6ebe3; border-radius: 5px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); transition: width 0.25s; border-radius: 5px; }

.upload-zone {
    border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 38px; text-align: center;
    cursor: pointer; transition: border-color 0.15s, background 0.15s; background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--brand); background: var(--brand-tint); }
.upload-zone p { margin: 4px 0; }
.upload-zone .hint { color: var(--text-muted); font-size: 13px; }

.file-list { margin-top: 14px; max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.file-list-item { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.file-list-item:last-child { border-bottom: none; }
.file-list-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list-item .size { color: var(--text-muted); }

footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); }
footer .brand-green { color: var(--brand-dark); font-weight: 500; }

/* ---- Splash / loading screen (G4D dotviewer štýl) ---- */
.splash-screen {
    overflow: hidden; background: #ffffff; line-height: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; position: fixed; inset: 0; z-index: 9999;
}
.splash-screen.fade-out { animation: splash-fade-out 0.5s ease forwards; }
@keyframes splash-fade-out { 0% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.splash-screen__ring { width: 140px; height: 140px; position: relative; display: flex; align-items: center; justify-content: center; }
.splash-screen__ring svg { width: 100%; height: 100%; position: absolute; top: 0; left: 0; animation: splash-spin 1.4s linear infinite; }
@keyframes splash-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.splash-screen__ring .bg { fill: none; stroke: rgba(0,0,0,0.08); stroke-width: 6; }
.splash-screen__ring .fg { fill: none; stroke: #63B753; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 110 280; }
.splash-screen__ring img { width: 80px; height: 80px; position: relative; z-index: 1; display: block; }
.splash-screen__text {
    margin-top: 28px; font-family: var(--font-cond); color: #5a5a5a; font-size: 0.95rem;
    letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500;
}
.splash-screen__text i { display: inline-block; font-style: normal; }
.splash-screen__text i::before { content: "."; color: #63B753; }
.splash-screen__text .d1 { animation: sdot 1.3s linear infinite; }
.splash-screen__text .d2 { animation: sdot 1.3s linear infinite 0.43s; }
.splash-screen__text .d3 { animation: sdot 1.3s linear infinite 0.86s; }
@keyframes sdot { 0%, 30% { opacity: 0; } 31%, 100% { opacity: 1; } }
