:root {
    --bg-color: #f0f0f0;
    --text-primary: #000000;
    --text-secondary: #333333;
    --primary-color: #0000cc;
    --primary-color-hover: #0000ff;
    --danger-color: #cc0000;
    --success-color: #008000;
    --warning-color: #ffcc00;
    --info-color: #0066cc;
    --border-color: #999999;
    --panel-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

a {
    color: var(--primary-color);
    text-decoration: underline;
}

a:hover {
    color: var(--primary-color-hover);
}

/* Classic Panels */
.glass-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

p {
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Login Page specific */
.login-bg {
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--primary-color);
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 5px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: Arial, sans-serif;
}

.form-control:focus {
    outline: 1px solid #000000;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid #666666;
    background-color: #e0e0e0;
    color: #000;
    font-family: Arial, sans-serif;
    font-weight: normal;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn:active {
    background-color: #cccccc;
    border-style: inset;
}

.btn-primary {
    background-color: #cccccc;
    font-weight: bold;
}

.btn-success {
    background-color: #d0f0c0;
    border-color: #008000;
}

.btn-danger {
    background-color: #ffcccc;
    border-color: #cc0000;
}

.btn-warning {
    background-color: #ffffcc;
    border-color: #cccc00;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 2px 8px;
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.alert-danger {
    background-color: #ffcccc;
    color: #cc0000;
    border-color: #cc0000;
}

.alert-success {
    background-color: #d0f0c0;
    color: #008000;
    border-color: #008000;
}

.alert-info {
    background-color: #cceeff;
    color: #0066cc;
    border-color: #0066cc;
}

/* Layout */
.navbar {
    background-color: #cccccc;
    border-bottom: 2px solid #999999;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-weight: bold;
    font-size: 18px;
    color: #000;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: #0000cc;
    text-decoration: underline;
}

.nav-link:hover,
.nav-link.active {
    color: #ff0000;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #000;
    font-size: 12px;
}

.role-badge {
    background-color: #eeeeee;
    padding: 2px 5px;
    border: 1px solid #999999;
    font-size: 11px;
    font-weight: bold;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Grid layout for dashboards */
.dashboard-grid {
    display: flex;
    flex-direction: column; /* Stack panels vertically to use full width */
    gap: 20px;
}

.dashboard-grid>div {
    width: 100%; /* Force panels to span full width */
}

/* Cards (now just bordered div) */
.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin-bottom: 0;
    font-size: 16px;
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    padding: 2px 5px;
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: bold;
    background-color: #eeeeee;
    color: #000;
}

.status-pending {
    background-color: #ffffcc;
    border-color: #cccc00;
}

.status-approved {
    background-color: #d0f0c0;
    border-color: #008000;
}

.status-rejected {
    background-color: #ffcccc;
    border-color: #cc0000;
}

.status-markdown {
    background-color: #cceeff;
    border-color: #0066cc;
}

/* Item List */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-card {
    background-color: #f9f9f9;
    border: 1px solid #cccccc;
    padding: 15px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    border-bottom: 1px dashed #cccccc;
    padding-bottom: 5px;
}

.kaspi-order {
    font-weight: bold;
    font-size: 14px;
    color: #0000cc;
}

.item-date {
    font-size: 12px;
    color: #666666;
}

.item-desc {
    margin-bottom: 10px;
    font-size: 13px;
}

.item-photo {
    width: 100%;
    max-width: 200px;
    border: 1px solid #999999;
    margin-bottom: 10px;
    display: block;
}

.item-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #cccccc;
}

.markdown-info {
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f8ff;
    border: 1px solid #0066cc;
}

.markdown-price {
    font-size: 16px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px 10px;
    color: #666666;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    /* Fallback for older browsers */
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 20px;
    border: 2px solid #000000;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #000000;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.close-btn:hover {
    color: #ff0000;
}

/* History Log */
.history-log {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dotted #999999;
    font-size: 12px;
}

.history-item {
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px dotted #cccccc;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    color: #666666;
    font-size: 11px;
    display: block;
}

.history-user {
    color: #0000cc;
    font-weight: bold;
}

/* DataTables Overrides for 2000s look */
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #999;
    background-color: #fff;
    padding: 2px;
}

table.dataTable {
    border-collapse: collapse !important;
    border: 1px solid #000 !important;
}

table.dataTable thead th,
table.dataTable thead td {
    background-color: #e0e0e0;
    border: 1px solid #999 !important;
    color: #000;
    font-weight: bold;
}

table.dataTable tbody tr {
    background-color: #fff;
    border: 1px solid #ccc !important;
}

table.dataTable tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

table.dataTable tbody td {
    border: 1px solid #ccc !important;
    color: #000;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid #999 !important;
    background: #e0e0e0 !important;
    color: #000 !important;
    padding: 2px 8px !important;
    margin: 0 2px;
    border-radius: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #ccc !important;
    border: 1px solid #000 !important;
    font-weight: bold;
}

table.dataTable.display tbody tr.odd>.sorting_1,
table.dataTable.order-column.stripe tbody tr.odd>.sorting_1 {
    background-color: #f1f1f1;
}

table.dataTable.display tbody tr.even>.sorting_1,
table.dataTable.order-column.stripe tbody tr.even>.sorting_1 {
    background-color: #fafafa;
}