/* Custom Styles for BORS COASTING Order Management System */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
}

/* Navbar Styling */
.navbar {
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

#connectionStatus {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 0.5rem;
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-weight: 600;
}

/* Action Card */
.action-card {
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    background-color: #fff;
    transition: all 0.3s ease;
}

.action-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.action-card h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Form Styling */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* Button Styling */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn i {
    margin-right: 0.5rem;
}

/* Statistics Box */
.stat-box {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 1rem;
    border: 0;
    transition: all 0.3s ease;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-box::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="white" stroke-width="2" viewBox="0 0 200 200"><path d="M10 150 Q 95 10 190 150"/><path d="M10 120 Q 95 40 190 120"/></svg>');
    background-size: cover;
    pointer-events: none;
}

.stat-box h6 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.stat-box .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
}

.stat-value-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-weight: 600;
}

.stat-opening {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 1.5rem 2rem -1rem rgba(79, 172, 254, 0.6);
}

.stat-closing {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 1.5rem 2rem -1rem rgba(250, 112, 154, 0.6);
}

.stat-reconcile {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    box-shadow: 0 1.5rem 2rem -1rem rgba(132, 250, 176, 0.6);
}

.stat-total {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    box-shadow: 0 1.5rem 2rem -1rem rgba(246, 211, 101, 0.6);
}

.stat-box .stat-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.stat-box .currency-symbol {
    font-size: 0.9rem;
    opacity: 0.85;
}

.stat-box .stat-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-box .stat-divider {
    height: 1px;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.25);
}

.stat-box .comparison-text {
    font-size: 0.8rem;
    opacity: 0.85;
}

.stat-box .highlight {
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
}

.stat-box .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.35rem;
    background: rgba(255, 255, 255, 0.75);
}

/* Alert Styling */
.alert {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: #212529;
}

.stat-box p {
    margin: 0;
    font-size: 0.875rem;
}

/* Alert Styling */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* Loading Spinner */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* Footer */
footer {
    margin-top: auto;
    box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .action-card {
        margin-bottom: 1rem;
    }

    .stat-box {
        margin-bottom: 1rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

/* Animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card {
    animation: fadeIn 0.5s ease-in;
}
