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

:root {
    --brand-primary: #296495;
    --brand-secondary: #6c757d;
    --brand-success: #28a745;
    --brand-info: #17a2b8;
    --brand-warning: #ffc107;
    --brand-danger: #dc3545;
    --sidebar-bg: #101b2b;
    --sidebar-text: #ecf0f1;
    --sidebar-hover: #34495e;
    --sidebar-active: #3498db;
    --bs-border-radius: 15px;
    --bs-border-radius-sm: 15px;
    --bs-primary-rgb: 41, 100, 149;
    --bs-success-rgb: 40, 167, 69;
}

body {
    font-family: "Quicksand", Helvetica, Arial, Lucida, sans-serif;
}

.btn, .form-control:not(textarea) {
    --bs-border-radius: 99px;
}

/* Station icons
   ============= */

.station-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    border: 1px solid var(--bs-border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--brand-primary, #0d6efd);
    background: var(--bs-primary-bg-subtle, rgba(13, 110, 253, 0.08));
}

/* Utility classes
   =============== */

.text-pre {
    white-space: pre-wrap;
}

/* Color theming
   ============= */

.btn {
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: var(--brand-primary);
    --bs-btn-disabled-color: var(--brand-primary);
}

.btn-disabled {
    opacity: 0.5;
}

.btn-primary {
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--brand-primary) 85%, black);
    border-color: color-mix(in srgb, var(--brand-primary) 85%, black);
}

.btn-outline-primary {
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-primary);
    --bs-btn-hover-border-color: var(--brand-primary);
    --bs-btn-color: var(--brand-primary);
}

/* Login pages
   =========== */

[data-auth="false"] {
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
}

/* Forms
   ===== */

.validation-summary-errors ul {
    margin-bottom: 0;
}

.required-indicator {
    color: var(--brand-danger);
    font-weight: bold;
}

.form-switch,
input[type="checkbox"],
.form-switch label {
    cursor: pointer;
}

.form-control::placeholder {
    opacity: 0.5;
}

/* Wrapping
   ======== */

dt, th, button {
    text-wrap: nowrap;
}

/* Cards
   ===== */

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card *:last-child {
    margin-bottom: 0;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
}

.card-header :is(h1, h2, h3, h4, h5, h6) {
    margin: 0;
}

/* Tables
   ====== */

.table tr:last-child {
    border-bottom: #fff;
}

.table tr .btn-group-sm .btn {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-font-size: 0.75rem;
    margin-top: -0.5rem;
    margin-bottom: -0.25rem;
}

@media (min-width: 768px) {
    .table > :not(caption) > * > * {
        padding: 0.75rem;
    }

    .card-body .table > :not(caption) > * > * {
        padding: 0.5rem;
    }
}

@media (max-width: 1024px) {

    .table {
        font-size: 0.95em;
        letter-spacing: -0.5px;
    }
}

@media (max-width: 768px) {

    .table {
        font-size: 0.9em;
        letter-spacing: -0.75px;
    }
}

/* RecordStationTransaction responsive tweaks */
@media (max-width: 1000px) {
    [data-quantity-group] {
        max-width: 140px;
        width: 100%;
    }

    [data-weight-group] {
        max-width: 120px;
        width: 100%;
    }
}

.outputs-table .outputs-qty-col {
    width: 170px;
}

.outputs-table .outputs-weight-col {
    width: 150px;
}

@media (max-width: 1000px) {
    .outputs-table .outputs-qty-col,
    .outputs-table .outputs-weight-col {
        width: 140px;
    }
}

[data-output-row] {
    border-color: #fff;
}

/* Sidebar
   ======= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Adjust main content */

[data-auth="true"] .main-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Navigation items */

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

.nav-section {
    margin-bottom: 5px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    width: 100%;
    text-align: left;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
}

.nav-section-header:hover {
    background-color: var(--sidebar-hover);
}

.nav-section-header i {
    transition: transform 0.2s;
}

.nav-section-header.collapsed i.fa-chevron-down {
    transform: rotate(-90deg);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 20px 10px 40px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--sidebar-active);
    color: #fff;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Sidebar toggle button */

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 5px 10px;
    border-radius: 99px;
    cursor: pointer;
}

/* User info in sidebar */

.sidebar-user {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.sidebar-user a {
    color: var(--sidebar-text);
    text-decoration: none;
}

/* Responsive design */

@media (max-width: 768px) {

    .sidebar {
        margin-left: -250px;
    }

    .sidebar.active {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    /* Adjust main content */

    [data-auth="true"] .main-content {
        margin-left: 0;
        padding-top: 35px;
    }
}

/* Page header styling */
.page-header {
    background-color: #f8f9fa;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 400;
}

/* Pulse animation
   =============== */

.pulse {
    position: absolute;
    display: inline-block;
}

.pulse-circle {
    width: 15px;
    height: 15px;
    background-color: var(--brand-success);
    border-radius: 50%;
    position: absolute;
    top: 5px;
    left: 5px;
}

.pulse-ring {
    border: 3px solid var(--brand-success);
    -webkit-border-radius: 30px;
    height: 25px;
    width: 25px;
    position: absolute;
    top: 0;
    left: 0;
    animation: pulsate 2s ease-out infinite;
    opacity: 0.0
}

@-webkit-keyframes pulsate {
    0% { transform: scale(0.1, 0.1); opacity: 0.0; }
    50% { opacity: 1.0; }
    100% { transform: scale(1.2, 1.2); opacity: 0.0; }
}
