﻿
:root {
    --color-kview: rgb(25, 26, 81);
    --color-kview-light: #4865db;
    --color-ink: #202f32;
    --color-border: #e4e7ed;
}

body {
    margin: 0;
    font-family: Figtree, ui-sans-serif, system-ui, sans-serif;
    color: var(--color-ink);
    background: #f5f7fa;
}

#dashboard {
    min-height: 100vh;
}

#dashboard .main-row {
    display: flex;
    flex-wrap: nowrap;
    min-height: 100vh;
}

#left-menu {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--color-kview-light);
}

#left-menu .sticky-content {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#left-menu .app-title {
    font-weight: 600;
    color: white;
    text-align: center;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 5%;
    margin: 5%;
    font-family: serif;
    font-size: 1.1rem;
}

#menu-list {
    list-style: none;
    padding: 0 20px;
    margin: 0;
    flex: 1;
}

#menu-list li {
    padding: 10px;
}

#menu-list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 100%;
}

#menu-list .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    transition: border 0.3s, background-color 0.3s, color 0.3s;
}

#menu-list .menu-text {
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    margin-left: 15px;
    font-size: 0.85rem;
    transition: color 0.3s;
}

#menu-list a:hover .menu-text,
#menu-list a.active .menu-text {
    color: white;
}

#menu-list a:hover .icon,
#menu-list a.active .icon {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
}

#menu-list a.active .menu-text {
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#left-menu .version {
    font-size: 10px;
    text-align: center;
    padding-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

#content {
    flex: 1;
    min-width: 0;
}

#top-menu {
    height: 50px;
    background-color: white;
    box-shadow: rgba(0, 0, 0, 0.1) 0 4px 6px -1px, rgba(0, 0, 0, 0.06) 0 2px 4px -1px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.5rem;
    gap: 1rem;
}

#top-menu .user-name {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-ink);
}

#top-menu .logout-link {
    color: var(--color-kview-light);
    font-size: 1.1rem;
}

.main-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
    margin: 1rem;
}

.main-card .card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem 0;
}

.main-card .card-title h3 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--color-kview);
}

.main-card .card-body {
    padding: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--color-kview);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table a {
    color: var(--color-kview-light);
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.status-item {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1rem;
}

.status-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #818792;
    margin-bottom: 0.25rem;
}

.status-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-ink);
    word-break: break-word;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom right, var(--color-kview-light), var(--color-kview));
}

.login-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.login-card h1 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    color: var(--color-kview);
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 5rem;
}

.form-error {
    color: rgb(174, 16, 34);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.btn-primary {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--color-kview-light);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
}

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

.btn-primary.inline,
.btn-secondary,
.btn-danger {
    width: auto;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn-secondary {
    background: #e9ecef;
    color: var(--color-ink);
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-danger {
    background: rgb(174, 16, 34);
    color: white;
}

.btn-danger:hover {
    background: rgb(140, 12, 28);
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-kview-light);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.card-back:hover {
    text-decoration: underline;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0 1.5rem;
}

.form-grid .form-group.span-2 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.flash {
    margin: 1rem 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
}

.table-actions a,
.table-actions button {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.inline-delete-form {
    display: inline;
}

.list-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-links li a {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    color: var(--color-ink);
    text-decoration: none;
}

.list-links li a:hover {
    background: #f8fafc;
    border-color: var(--color-kview-light);
}

.table-scroll {
    overflow-x: auto;
}

.dashboard-table .col-separator {
    border-left: 2px solid var(--color-border);
}

.dashboard-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dashboard-table th.num,
.dashboard-table td.num {
    text-align: right;
}

.dashboard-group-row td {
    background: #eef2f7;
    font-weight: 600;
    color: var(--color-kview);
    border-bottom: 1px solid #d5dbe3;
}

.dashboard-subtotal-row td {
    background: #f8fafc;
    font-weight: 700;
    border-bottom: 2px solid var(--color-border);
}

.dashboard-footnote {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: #818792;
}

.dashboard-currency-badge {
    font-size: 0.85rem;
    font-weight: 500;
    color: #818792;
}

.dashboard-quarterly-investor {
    margin: 0 0 0.75rem;
    color: var(--color-kview);
    font-size: 1rem;
}

.dashboard-quarterly-table {
    min-width: 720px;
}

.dashboard-chart-wrap {
    position: relative;
    height: 640px;
    margin-bottom: 1.25rem;
}

#content .pagination-nav .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

#content .pagination-nav .pagination > li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#content .pagination-nav .pagination > li > a,
#content .pagination-nav .pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-ink);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1;
}

#content .pagination-nav .pagination > li > a:hover {
    border-color: var(--color-kview-light);
    color: var(--color-kview-light);
}

#content .pagination-nav .pagination > li.active > span {
    background: var(--color-kview-light);
    color: #fff;
    border-color: var(--color-kview-light);
    font-weight: 600;
}

#content .pagination-nav .pagination > li.disabled > span {
    color: #a0a7b4;
    background: #f8fafc;
    cursor: default;
}

#content .pagination-nav .pagination > li:first-child > a,
#content .pagination-nav .pagination > li:first-child > span,
#content .pagination-nav .pagination > li:last-child > a,
#content .pagination-nav .pagination > li:last-child > span {
    min-width: 1.75rem;
    padding: 0 0.35rem;
    font-size: 0.8125rem;
}

.table-pagination-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.table-pagination-links {
    flex: 1 1 auto;
}

.items-per-page-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.items-per-page-form label {
    font-size: 0.875rem;
    color: #818792;
    white-space: nowrap;
}

.items-per-page-form select {
    height: 2rem;
    min-width: 4.5rem;
    padding: 0 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-ink);
    font-size: 0.875rem;
}

@media (max-width: 991px) {
    #left-menu {
        width: 50px;
    }

    #menu-list {
        padding: 0;
    }

    #menu-list .menu-text,
    #left-menu .app-title {
        display: none;
    }

    #menu-list li {
        padding: 7px;
    }

    #menu-list .icon {
        width: 35px;
        height: 35px;
        padding: 5px;
    }
}

.fields-list {
    width: 100%;
}

.fields-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem 1.5rem;
}

@media (min-width: 576px) {
    .fields-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .fields-list-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.fields-list-grid .span-full,
.fields-list-separator {
    grid-column: 1 / -1;
}

.fields-list--compact .fields-list-separator {
    margin: 0.5rem 0 0.15rem;
}

.field-list-item {
    display: grid;
    grid-template-columns: minmax(90px, 34%) 1fr;
    gap: 0.5rem 0.75rem;
    align-items: start;
    min-width: 0;
}

.field-label-container {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.field-label {
    margin: 0;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 300;
    color: #5f6772;
    cursor: help;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.field-value-container {
    min-width: 0;
}

.field-value {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-ink);
    word-break: break-word;
}

.field-value-image .dynamic-field-img {
    display: block;
}

.fields-list-separator {
    margin: 0.75rem 0 0.25rem;
}

.fields-list-grid.fields-list-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 1rem;
}

@media (min-width: 768px) {
    .fields-list-grid.fields-list-grid--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .fields-list-grid.fields-list-grid--compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.field-list-item.field-list-item--compact {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.2rem 0;
}

.field-list-item.field-list-item--compact .field-label-container {
    flex: 0 0 auto;
    justify-content: flex-start;
}

.field-list-item.field-list-item--compact .field-label {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #818792;
    white-space: nowrap;
    overflow: visible;
}

.field-list-item.field-list-item--compact .field-label::after {
    content: ':';
}

.field-list-item.field-list-item--compact .field-value-container {
    flex: 1 1 auto;
    min-width: 0;
}

.field-list-item.field-list-item--compact .field-value {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}
