/* ProBuhalterija personalo dokumentų sistema — ProBankConvert dizaino tokens */

:root {
    --primary: #1b4a5a;
    --primary-light: #e8f0f3;
    --primary-dark: #143d4a;
    --gold: #c4a96a;
    --gold-light: #f5f0e4;
    --navy: #1b4a5a;
    --navy-light: #2a6070;
    --text: #32373c;
    --text-light: #69727d;
    --text-muted: #abb8c3;
    --bg: #ffffff;
    --bg-light: #f7f8f9;
    --green: #39b54a;
    --red: #d64545;
    --shadow: 0 2px 20px rgba(27, 74, 90, 0.06);
    --shadow-lg: 0 8px 40px rgba(27, 74, 90, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-pill: 30px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Navigation */
.nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(27, 74, 90, 0.1);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    color: var(--primary);
    font-size: 16px;
    text-decoration: none;
}

.nav-brand:hover { color: var(--primary); }

.nav-logo {
    height: 36px;
    width: auto;
    display: block;
}

.nav-brand-divider {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
}

.nav-brand-section {
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 14px;
}

.nav-user a { color: var(--primary); font-weight: 500; }

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}

.container-narrow {
    max-width: 540px;
    margin: 0 auto;
    padding: 32px;
}

/* Headings */
h1 { font-size: 28px; font-weight: 700; color: var(--primary); margin: 0 0 8px; }
h2 { font-size: 20px; font-weight: 600; color: var(--primary); margin: 32px 0 12px; }
h3 { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 8px; }
.subtitle { color: var(--text-light); margin: 0 0 24px; }

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card-link {
    display: block;
    color: inherit;
}

.card-link:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: inherit;
}

.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.card-arrow {
    color: var(--text-muted);
    font-size: 20px;
}

/* Grid */
.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Forms */
.form-group { margin-bottom: 16px; }

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid rgba(27, 74, 90, 0.15);
    border-radius: var(--radius);
    background: white;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 74, 90, 0.1);
}

textarea { min-height: 80px; resize: vertical; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); color: white; }

.btn-gold {
    background: var(--gold);
    color: white;
}
.btn-gold:hover { background: #b6985a; color: white; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(27, 74, 90, 0.2);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table td {
    padding: 14px 16px;
    border-top: 1px solid rgba(27, 74, 90, 0.08);
    font-size: 14px;
}

.data-table tr:hover td { background: var(--bg-light); }

/* Detail key/value list */
.kv-list {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px 24px;
}

.kv-list dt {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kv-list dd {
    margin: 0;
    font-size: 15px;
    color: var(--text);
}

.kv-list dd.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: rgba(214, 69, 69, 0.1);
    color: var(--red);
    border: 1px solid rgba(214, 69, 69, 0.2);
}

.alert-success {
    background: rgba(57, 181, 74, 0.1);
    color: var(--green);
    border: 1px solid rgba(57, 181, 74, 0.2);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-success { background: rgba(57, 181, 74, 0.15); color: var(--green); }
.badge-muted { background: rgba(27, 74, 90, 0.08); color: var(--text-light); }
.badge-gold { background: var(--gold-light); color: #8a7541; }
.badge-warn { background: rgba(196, 169, 106, 0.2); color: #8a7541; }
.badge-danger { background: rgba(210, 78, 78, 0.15); color: #b03333; }

/* Login screen */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), white);
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

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

.login-mark {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--navy-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    margin: 0 auto 16px;
}

.login-logo {
    height: 80px;
    width: auto;
    display: block;
    margin: 0 auto 24px;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

/* Document actions row */
.doc-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.doc-action-card {
    border: 1px solid rgba(27, 74, 90, 0.12);
    border-radius: var(--radius);
    padding: 16px;
    background: white;
    transition: all 0.2s;
}

.doc-action-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.doc-action-card form { margin: 0; }

.doc-action-card h3 { margin: 0 0 12px; }

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.breadcrumbs a { color: var(--primary); }
.breadcrumbs span.sep { color: var(--text-muted); }

/* Navigation links */
.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    flex: 1;
    margin-left: 32px;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-links a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-links a.active {
    background: var(--primary);
    color: white;
}

.sign-tab-btn.active {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}

.nav-company-pill {
    background: var(--gold-light);
    color: #8a7541;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h1 { margin-bottom: 4px; }

/* Stat cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.stat-card.stat-warn { border-left-color: var(--gold); }
.stat-card.stat-danger { border-left-color: var(--red); }
.stat-card.stat-success { border-left-color: var(--green); }

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-sub {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    border-top: 4px solid var(--cat-color, var(--primary));
    display: block;
    color: inherit;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: inherit;
}

.category-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--cat-color, var(--primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.category-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.category-card .cat-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.category-card .cat-count {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

/* Dashboard 2-column bottom */
.dashboard-bottom {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 880px) {
    .dashboard-bottom { grid-template-columns: 1fr; }
}

/* Reminders */
.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-card {
    background: white;
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.reminder-card.severity-high { border-left-color: var(--red); }
.reminder-card.severity-medium { border-left-color: var(--gold); }
.reminder-card.severity-low { border-left-color: var(--primary); }

.reminder-text {
    font-size: 14px;
    line-height: 1.4;
}

.reminder-text strong { color: var(--primary); display: block; margin-bottom: 2px; }

.reminder-days {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--bg-light);
    color: var(--text-light);
}

.reminder-card.severity-high .reminder-days {
    background: rgba(214, 69, 69, 0.15);
    color: var(--red);
}

.reminder-card.severity-medium .reminder-days {
    background: rgba(196, 169, 106, 0.2);
    color: #8a7541;
}

/* Search bar */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.search-bar input { flex: 1; }

/* 2-col grid */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 800px) {
    .grid-2col { grid-template-columns: 1fr; }
}

/* Form row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    color: var(--text) !important;
    cursor: pointer;
}

.checkbox-label input { width: auto; margin: 0; }

/* Portal link box */
.portal-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    border: 1px solid rgba(27, 74, 90, 0.1);
    border-radius: var(--radius);
    padding: 8px 8px 8px 14px;
    margin-top: 12px;
}

.portal-link-box code {
    flex: 1;
    font-size: 12px;
    color: var(--text);
    word-break: break-all;
    background: transparent;
}

/* Calendar */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-grid {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekday {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    text-align: center;
    padding: 6px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    min-height: 84px;
    padding: 6px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-day.empty { background: transparent; }

.calendar-day.today {
    background: var(--primary-light);
    border: 1px solid var(--primary);
}

.calendar-day-num {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}

.calendar-day.today .calendar-day-num { color: var(--primary); }

.calendar-event {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Demo credentials box */
.demo-credentials {
    background: var(--gold-light);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 16px;
    font-size: 13px;
    color: #8a7541;
}

.demo-credentials strong { color: var(--gold); }
.demo-credentials code {
    background: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text);
}

/* Sign demo box */
.sign-demo-box {
    background: linear-gradient(135deg, var(--gold-light), white);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    border: 1px solid var(--gold);
    margin-bottom: 24px;
}

.sign-demo-box .sign-icon {
    font-size: 48px;
    color: var(--gold);
    margin-bottom: 12px;
}

/* Dashboard misc */
.dashboard-header { margin-bottom: 24px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 24px 0 12px;
}

.section-header h2 { margin: 0; }

.link-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.category-info { margin-top: 4px; }

.category-info h3 { margin: 0 0 4px; font-size: 16px; }

.category-info p { font-size: 13px; color: var(--text-light); margin: 0 0 12px; }

.category-count {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

.reminder-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.reminder-body { flex: 1; min-width: 0; }
.reminder-title { font-weight: 600; color: var(--primary); font-size: 14px; }
.reminder-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(27, 74, 90, 0.08);
}

/* stat-value contextual coloring */
.stat-value.stat-warn { color: var(--gold); }
.stat-value.stat-danger { color: var(--red); }

/* Responsive */
@media (max-width: 700px) {
    .nav { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
    .nav-links { margin-left: 0; flex-wrap: wrap; order: 3; width: 100%; }
    .container, .container-narrow { padding: 16px; }
    .kv-list { grid-template-columns: 1fr; gap: 4px 0; }
    .kv-list dt { margin-top: 12px; }
    .calendar-day { min-height: 60px; font-size: 11px; }
    .calendar-event { font-size: 10px; }
}
