:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --text-color: #333;
    --light-gray: #f5f6fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    background-color: #333;
    color: white;
    padding: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.dashboard {
    min-height: 100vh;
}

/* Bevakningskort */
.admin-card-watch {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: fit-content;
    height: fit-content;
}

.admin-card-watch .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
}

.admin-card-watch .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-card-watch .card-body {
    padding: 20px;
}


/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: white;
    position: fixed;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed + .main-content {
    margin-left: 60px;
}

.sidebar-header {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: padding 0.3s ease;
}

.sidebar.collapsed .sidebar-header {
    padding: 0.5rem;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

.sidebar-nav ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    width: 100%;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    box-sizing: border-box;
    /* Vänsterjusterat som standard */
    justify-content: flex-start;
}

.sidebar-nav li a:hover {
    background-color: var(--secondary-color);
}

.sidebar-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav span {
    flex: 1;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

/* Collapsed state styles - ÄR dessa som centrerar */
.sidebar.collapsed .sidebar-nav span {
    display: none;
}

.sidebar.collapsed .sidebar-nav i {
    margin-right: 0;
    width: auto;
}

.sidebar.collapsed .sidebar-nav li a {
    justify-content: center; /* Centrera ENDAST när kollapsad */
    padding: 12px 0;
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    background-color: var(--light-gray);
    min-height: 100%;
    min-height: 100svh;       /* täck hela viewport-höjden */
    padding-bottom: calc(1rem + 60px); /* för fixed footer */
}

.top-header {
    height: var(--header-height);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.75rem;
    text-align: right;
    font-size: 1.2rem;
    width: 100%;
}
.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: var(--secondary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    padding-right: 1rem;
}

.content {
    padding: 2rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-row {
    margin-bottom: 2rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 90%;
}

.card.large {
    grid-column: 1 / -1;
}

.card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.card .number {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
    color: var(--primary-color);
}

.activity-list {
    list-style: none;
    padding: 0;
}

.activity-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.activity-list li:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        width: var(--sidebar-width);
    }

    .sidebar.collapsed {
        transform: translateX(0);
        width: 60px;
    }
    .sidebar.collapsed .sidebar-header {
        padding: 0;
    }
    .sidebar.collapsed .sidebar-header h2 {
        display: none;
    }
    .sidebar.collapsed .sidebar-header .btn {
        display: flex;
        align-items: center;
    }
    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
    color: var(--primary-color);
}

.page-header .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f0f0f0;
    color: var(--text-color);
    transition: background-color 0.3s;


}
.btn:hover {
    background-color: #e0e0e0;
}

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

.btn.danger {
    background-color: #dc3545;
    color: white;
}

.btn.small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto; /* scroll om det blir för brett */
    font-size: 0.85rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: auto; /* <-- detta gör att kolumnerna anpassas efter innehållet */
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
    text-align: left;       /* Vänsterjustering */
    vertical-align: middle; /* Vertikal centrering */
}

.data-table thead th {
    background-color: #f4f4f4;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.data-table tbody td input[type="text"] {
    width: 100%;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.data-table td {
    vertical-align: middle;
    border-bottom: 1px solid #a8a8a8; /* ← Lägger till radlinje */
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}



/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    display: inline-block;
}

.badge.success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge.warning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge {
    display: block; /* 👈 Gör varje badge till block så de staplas */
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin: 2px 0; /* 👈 Lite spacing mellan badges */
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Windows Grid */
.windows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.window-card {
    display: flex;
    flex-direction: column;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.window-details {
    flex: 1;
}

.window-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Order Filters */
.order-filters {
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Login Styles */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    margin: 0;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.login-header h2 {
    color: var(--primary-color);
    margin: 0.5rem 0;
    font-size: 1.75rem;
}

.logo-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 300px;
    margin: 0 auto;
}

.login-form .form-group {
    margin-bottom: 0;
    width: 100%;
}

.login-form label {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    text-align: center;
}

.login-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
    outline: none;
}

.login-form .btn {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    width: 100%;
}

.login-card .alert {
    text-align: center;
    max-width: 300px;
    margin: 0 auto 1.5rem auto;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-danger i {
    color: #dc2626;
}

/* User Menu Styles */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    padding-right: 1rem;
}

.username {
    font-weight: 500;
    color: var(--primary-color);
    margin-right: 1rem;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.btn-logout i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .username {
        display: none;
    }
    
    .btn-logout span {
        display: none;
    }
    
    .btn-logout {
        padding: 0.5rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
}

.window-details-modal .modal-content {
    max-width: 100%;
    width: 90%;
    max-height: 90vh;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
}

.window-details-modal .modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    padding: 1rem;
    margin: 0;
    border-bottom: 1px solid #eee;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-details-modal .modal-header h2 {
    margin: 0;
}

.window-details-modal .modal-header #saveButton {
    background-color: #28a745;
    color: white;
}

.window-details-modal .modal-header #saveButton:hover {
    background-color: #218838;
}

.window-details-modal .modal-body {
    overflow-y: auto;
    padding: 1rem;
    margin: 0;
}

.window-details-modal .close-button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Adjust spacing for better scrolling */
.window-details-grid {
    padding-bottom: 1rem;
}

.orders-section {
    margin-top: 1rem;
    padding-top: 1rem;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 1.5rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.modal-buttons {
    display: flex;
    gap: 2px;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.modal-header .btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    margin-left: 2px;
}

.modal-header .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.modal-header .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.modal-header .btn i {
    font-size: 0.9rem;
}

.modal-header .btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.modal-header .btn-danger:hover {
    background-color: #c82333;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.user-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-row:hover {
    background-color: #f8f9fa;
}

.btn.warning {
    background-color: #ffc107;
    color: #000;
}

/* Modal input styles */
.readonly-input {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.editable-input {
    background-color: white;
    border-color: #ddd;
}

.editable-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* Password Modal Styles */
.password-modal {
    z-index: 1001;
}

.password-modal .modal-content {
    max-width: 400px;
}

.password-modal .form-group {
    text-align: center;
}

.password-modal .form-group label {
    justify-content: center;
}

.password-modal .form-group input {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    margin: 0 auto;
}

#passwordError {
    margin-top: 1rem;
    margin-bottom: 0;
    display: none;
    justify-content: center;
}

.password-modal .modal-header h2 {
    text-align: center;
}

/* Shop list styles */
.shop-list {
    padding: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.shop-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.shop-item:last-child {
    border-bottom: none;
}

.shop-name {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.shop-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

.shop-details span {
    display: inline-block;
}

.shop-group {
    color: #888;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 1rem;
    color: #666;
}

.settings-section {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#languageSelect {
    max-width: 200px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}

.input-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}

.notification {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 1rem 2rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2000;
    animation: slideInLeft 0.3s ease-out;
}

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

.success-notification i {
    color: #28a745;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.error-notification {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c6cb;
}

.error-notification i {
    color: #dc3545;
}

select[multiple] {
    min-height: 200px;
    padding: 0.5rem;
}

select[multiple] option {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

select[multiple] option:last-child {
    border-bottom: none;
}

select[multiple] option:checked {
    background-color: var(--primary-color);
    color: white;
}

select[multiple] option:hover:not(:checked) {
    background-color: #f0f0f0;
}

.input-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 1px #28a745 !important;
    padding-right: 2.5rem !important;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") right 0.75rem center/1rem auto no-repeat;
    background-size: 1.25rem;
    background-position: right 0.5rem center;
}

.input-valid:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25) !important;
}

/* Update password input container styles */
.form-group {
    position: relative;
}

/* Common styles for password inputs in all modals */
.modal .form-group input[type="password"] {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    margin: 0 auto;
}

.modal .form-group input[type="password"].input-valid {
    padding-right: 2.5rem;
    background-position: calc(50% + 120px) center;
}

/* Center the form groups in both modals */
.modal .form-group {
    text-align: center;
}

.modal .form-group label {
    justify-content: center;
}

/* Common styles for all inputs in modals */
.modal .form-group input,
.modal .form-group select {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    margin: 0 auto;
}

.modal .form-group input[type="password"].input-valid,
.modal .form-group input.input-valid {
    padding-right: 2.5rem;
    background-position: calc(50% + 120px) center;
}

/* Update multiselect styles */
.modal .form-group select[multiple] {
    max-width: 100%;
    text-align: left;
    height: 200px;
    overflow-y: auto;
}

.modal .form-group select[multiple] option {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.modal .form-group select[multiple] option:checked {
    background-color: var(--primary-color);
    color: white;
}

.modal .form-group select[multiple] option:hover {
    background-color: #f0f0f0;
}

/* Center all form groups in modals */
.modal .form-group {
    text-align: center;
}

.modal .form-group label {
    justify-content: center;
}

/* Add these styles for the windows table */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable i {
    margin-left: 0.5rem;
    color: #999;
}

.sortable:hover i {
    color: var(--primary-color);
}

.loading-cell, .error-cell {
    text-align: center;
    padding: 2rem !important;
    color: #666;
}

.error-cell {
    color: #dc3545;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid #eee;
}

#pageInfo {
    min-width: 150px;
    text-align: center;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Window Details Modal Styles */
.window-details-modal .modal-content {
    max-width: 70%;
    width: 90%;
}

.window-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.details-column {
    padding: 1rem;
}

.details-column h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.detail-group {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.detail-group label {
    font-weight: 500;
    min-width: 120px;
    color: #666;
}

.detail-group span {
    color: var(--secondary-color);
}

.ou-header {
    display: flex;
    flex-direction: row;
    justify-content: space-around;

}

.kalHeader {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

    /* Update the close button styles */
.close-button {
    padding: 0.5rem 1rem;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.close-button:hover {
    background-color: #c82333;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

#windowComments {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.comment-item {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    border-bottom: none;
}

/* Add specific styles for the windows table */
.windows-table th,
.windows-table td {
    font-size: 0.8rem;
    padding: 0.5rem;
    line-height: 1.2;
}

.windows-table th {
    font-weight: 600;
    white-space: nowrap;
}

.windows-table td {
    white-space: nowrap;
}

/* Adjust the sort icon size to match */
.windows-table .sortable i {
    font-size: 0.75rem;
}

/* Add styles for table controls */
.table-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.filters-section {
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    width: 100%;
}

.page-size-control {
    align-self: flex-end;
    padding: 0.5rem 0;
}

/* Add spinner styles */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-cell {
    height: 200px;
    vertical-align: middle;
}

/* Add styles for clickable rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.clickable-row:hover {
    background-color: #f5f6fa;
}

/* Add styles for orders section in window details */
.orders-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    overflow-y: auto;
}

.orders-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.empty-cell {
    text-align: center;
    padding: 1rem;
    color: #666;
}

/* Make the order table more compact */
.orders-section .windows-table th,
.orders-section .windows-table td {
    padding: 0.4rem;
    font-size: 0.75rem;
}

/* Add styles for order links */
.order-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.order-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Update styles for editable fields */
.editable-field {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-input {
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 150px;
}

.edit-button {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.8rem;
    display: none;
}

.edit-button:hover {
    color: var(--primary-color);
}

/* Only show edit button on hover if the field has a value */
.editable-field:hover .edit-button {
    display: none;
}

.detail-value:not(.empty) + .edit-button {
    display: block;
}

.detail-value.empty ~ .detail-input {
    display: block;
}

.detail-value.empty {
    display: none;
}

/* Add styles for invoice field status */
.detail-group.missing .editable-field {
    border: 2px solid #dc3545;
    border-radius: 4px;
    padding: 0.5rem;
}

.detail-group.has-value .editable-field {
    border: 2px solid #28a745;
    border-radius: 4px;
    padding: 0.5rem;
}

.detail-input {
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 150px;
}

.detail-group.missing .detail-input {
    border-color: #dc3545;
}

.detail-group.has-value .detail-input {
    border-color: #28a745;
}

/* Update sidebar collapsed styles */
.sidebar.collapsed .sidebar-nav span {
    display: none;
}

.sidebar.collapsed .sidebar-nav i {
    margin-right: 0;
    width: auto; /* Låt ikonen ta sin naturliga bredd */
    text-align: center; /* Centrera ikonen */
}

.sidebar.collapsed .sidebar-nav li a {
    justify-content: center; /* Centrera hela länkinnehållet */
    padding: 1rem 0.5rem; /* Minska sidopaddingen */
}

/* Se till att hela sidebaren blir smalare när kollapsad */
.sidebar.collapsed {
    width: 60px;
    overflow: hidden; /* Förhindra att innehåll sticker ut */
}


.ou-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0.5rem;
}

#generateOuButton{
    font-size: 1rem;
}
#sendOuReportBtn {
    padding: 0.6rem;
}



/* Update filter styles for more compact layout */
.filter-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    min-width: 100px;
    max-width: 250px;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-color);
    white-space: nowrap;
    min-width: 60px;
    margin: 0;
}

.filter-select, .filter-date {
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.75rem;
    flex: 1;
    min-width: 100px;
    max-width: 150px;
}

.checkbox-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    align-items: center;
    margin-top: 0.5rem;
}

.checkbox-filters .filter-group {
    flex: 0 0 auto;
    gap: 0.25rem;
    min-width: auto;
    max-width: none;
}

.checkbox-filters .filter-group label {
    min-width: auto;
    font-size: 0.7rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

/* Adjust spacing in the filters section */
.filters-section {
    padding: 0.75rem;
}

/* Make buttons in filter actions more compact */
.filter-actions .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* Add notification banner styles */
.notification-banner {
    position: fixed;
    top: 1rem;
    left: 1rem;
    padding: 1rem;
    border-radius: 4px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: slideInLeft 0.3s ease-out;
}

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

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Add Select2 custom styles */
.select2-container--default .select2-selection--single {
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px;
    padding-left: 8px;
    font-size: 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 30px;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.select2-search__field {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
}

.select2-results__option {
    padding: 6px 8px;
    font-size: 0.75rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
}

/* Add or update button styles */
.btn-danger {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

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

/* Style the date input */
.detail-input[type="text"] {
    font-family: inherit;
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    width: 80px;
    text-align: center;
}

.detail-input[type="text"]::placeholder {
    color: #999;
    font-size: 0.75rem;
}

/* Style the order links */
.data-table a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.data-table a:hover {
    color: #1a4a6e;
    text-decoration: underline;
}

/* Add badge styles */
.invoice-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #495057;
    white-space: nowrap;
}

.invoice-badge + .invoice-badge {
    margin-left: 0.25rem;
}

/* Add styles for highlighted cells */
.highlight-no {
    background-color: #fff5f5;
    color: #dc3545;
}

/* Add comment styles */
.comment {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #e9ecef;
    background-color: #f8f9fa;
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-text {
    margin-bottom: 0.25rem;
}

.comment-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Add comment input styles */
.comment-section {
    width: 100%;
}

.comment-input-area {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.comment-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 2.5rem;
}

.comment-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

/* Update dashboard columns styles */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.dashboard-columns:first-of-type {
    margin-top: 2rem;
}

.dashboard-column {
    min-width: 0;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
}

.dashboard-card h2 {
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 1.25rem;
    color: var(--text-color);
}

/* Today's orders table styles */
.orders-table {
    width: 100%;
    font-size: 0.875rem;
}

.orders-table th {
    background-color: #f8f9fa;
    padding: 0.5rem;
    text-align: left;
    font-weight: 500;
}

.orders-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.orders-table tr:last-child td {
    border-bottom: none;
}

.orders-table a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* Add responsive styles */
@media (max-width: 1200px) {
    .dashboard-columns {
        grid-template-columns: 1fr 1fr;
    }
}

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

/* Update key numbers styles */
.key-numbers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    padding: 1rem;
    margin: 0 auto 1rem;
    max-width: 1200px;
    justify-content: center;
}

.key-numbers .card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.key-numbers .card h3 {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.key-numbers .card .number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

/* Add responsive styles for key numbers */
@media (max-width: 1200px) {
    .key-numbers {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .key-numbers {
        grid-template-columns: 1fr;
    }
}

/* Add BG validation styles */
.validation-summary {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.validation-table {
    width: 100%;
    font-size: 0.875rem;
}

.validation-table td {
    vertical-align: top;
    padding: 0.5rem;
}

.validation-table tr {
    background-color: #fff5f5;  /* Light red background */
}

.validation-table tr:hover {
    background-color: #ffe8e8;  /* Slightly darker red on hover */
}

.validation-table tr:not(:last-child) td {
    border-bottom: 1px solid #fee2e2;  /* Light red border */
}

.validation-table a {
    color: #dc3545;  /* Red links */
}

.validation-table a:hover {
    color: #bd2130;  /* Darker red on hover */
}

/* Add success message styles */
.success-cell {
    text-align: center;
    padding: 2rem !important;
    background-color: #d4edda !important; /* Override the red background */
}

.success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #155724;
}

.success-message i {
    font-size: 3rem;
    color: #28a745;
}

.success-message span {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Add styles for validation success container */
.validation-success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background-color: #d4edda;
    border-radius: 8px;
    margin-top: 1rem;
}

.validation-success-container .success-message {
    text-align: center;
    padding: 2rem;
}

.validation-success-container .success-message i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.validation-success-container .success-message span {
    font-size: 1.5rem;
    font-weight: 500;
    color: #155724;
    display: block;
}

/* Add small spinner for numbers */
.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Add loading placeholder styles */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
    gap: 0.5rem;
}

/* Add badge styles for key numbers */
.badge-success {
    background-color: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    display: inline-block;
    min-width: 3rem;
    text-align: center;
}

/* Update key numbers styling */
.key-numbers .number {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.key-numbers .spinner-small {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

/* Service status table styles */
.service-status-table {
    width: 100%;
    border-collapse: collapse;
}

.service-status-table th,
.service-status-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.service-status-table th {
    font-weight: 500;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.service-status-table tr:last-child td {
    border-bottom: none;
}

.status-ok {
    color: #28a745;
    font-size: 1.2rem;
}

/* Center the status column */
.status-column {
    text-align: center;
    width: 100px;
}

.service-status-table td.status-column {
    text-align: center;
}

/* KAL status styles */
.kal-description {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.kal-status-table {
    width: 100%;
    border-collapse: collapse;
}

.kal-status-table th,
.kal-status-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.kal-status-table th {
    font-weight: 500;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.kal-status-table tr:last-child td {
    border-bottom: none;
}

.kal-status-table .missing-row {
    background-color: #fff5f5;
}

.kal-status-table .missing-row:hover {
    background-color: #ffe8e8;
}

/* KAL orders modal styles */
.kal-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.kal-orders-table th,
.kal-orders-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.kal-orders-table th {
    font-weight: 500;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.kal-orders-table tr:last-child td {
    border-bottom: none;
}

.kal-orders-table a {
    color: var(--primary-color);
    text-decoration: none;
}

.kal-orders-table a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Make KAL status table rows clickable */
.kal-status-table tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.kal-status-table tr:hover:not(.missing-row) {
    background-color: #f5f6fa;
}

/* Add styles for the action column */
.action-column {
    width: 100px;
    text-align: center;
}

.btn-warning {
    background-color: #ffc107;
    color: #000;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Prevent row click when clicking the button */
.kal-status-table .action-column {
    cursor: default;
}

/* KAL repair table styles */
.kal-repair-table {
    width: 100%;
    border-collapse: collapse;
}

.kal-repair-table th,
.kal-repair-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.kal-repair-table th {
    font-weight: 500;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.kal-repair-table tr:last-child td {
    border-bottom: none;
}

.kal-repair-table a {
    color: var(--primary-color);
    text-decoration: none;
}

.kal-repair-table a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Status icons */
.status-ok {
    color: #28a745;
    font-size: 1.2rem;
}

.status-error {
    color: #dc3545;
    font-size: 1.2rem;
}

/* Center status column */
.kal-repair-table .status-column {
    text-align: center;
    width: 100px;
}

/* Add message column styles */
.kal-repair-table .message-column {
    min-width: 200px;
    color: #666;
    font-size: 0.9rem;
}

/* Update table layout for three columns */
.kal-repair-table th,
.kal-repair-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.kal-repair-table th:last-child,
.kal-repair-table td:last-child {
    width: 100px;
    text-align: center;
}

/* Date and time display styles */
.date-display {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-transform: capitalize;
}

#currentTime {
    font-family: monospace;
    font-size: 1.8rem;
    min-width: 5rem;
}

/* Search container styles */
.search-container {
    width: 100%;
}

.search-input-group {
    display: flex;
    margin-bottom: 20px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1.2rem;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-button {
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 15px;
    cursor: pointer;
}


.search-button:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.search-button i {
    font-size: 1rem;
}

.admin-flex-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin-bottom: 20px;
}

.admin-flex-item {
    min-width: 200px !important;  /* Minska från 320px */
    max-width: 250px !important;  /* Lägg till en max-width */
    flex: 0 1 auto !important;    /* Ändra från flex: 1 */
    font-size: 0.9rem;
    padding: 1rem !important;     /* Minska padding från 1.25rem */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.admin-tools .admin-flex-wrapper {
    flex-direction: row !important;
    justify-content: center !important;
}

/* Responsiv tabell styling för admin flex wrapper */
.admin-flex-wrapper + .data-table,
.admin-flex-wrapper ~ .data-table,
.admin-card-invoice .items-table {
    table-layout: fixed; /* Ändra från auto till fixed för bättre responsivitet */
    width: 100%;
    min-width: 0; /* Tillåt tabellen att krympa */
}

.admin-card-invoice .items-table th,
.admin-card-invoice .items-table td {
    white-space: normal; /* Tillåt text att wrappa */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Specifika kolumnbredder för items-table */
.admin-card-invoice .items-table th:nth-child(1), /* Artikelnummer */
.admin-card-invoice .items-table td:nth-child(1) {
    width: 15%;
    min-width: 100px;
}

.admin-card-invoice .items-table th:nth-child(2), /* Namn */
.admin-card-invoice .items-table td:nth-child(2) {
    width: 35%;
    min-width: 150px;
}

.admin-card-invoice .items-table th:nth-child(3), /* Antal */
.admin-card-invoice .items-table td:nth-child(3) {
    width: 10%;
    min-width: 60px;
}

.admin-card-invoice .items-table th:nth-child(4), /* Pris */
.admin-card-invoice .items-table td:nth-child(4) {
    width: 15%;
    min-width: 80px;
}

.admin-card-invoice .items-table th:nth-child(5), /* Ramnummer */
.admin-card-invoice .items-table td:nth-child(5) {
    width: 25%;
    min-width: 120px;
}

/* Responsive adjustments för mindre skärmar */
@media (max-width: 768px) {
    .admin-flex-wrapper {
        flex-direction: column;
    }

    .admin-flex-item {
        min-width: 100% !important;
    }

    .admin-card-invoice .items-table th,
    .admin-card-invoice .items-table td {
        font-size: 0.8rem;
        padding: 0.3rem;
    }

    .admin-card-invoice .items-table th:nth-child(1),
    .admin-card-invoice .items-table td:nth-child(1) {
        min-width: 80px;
    }

    .admin-card-invoice .items-table th:nth-child(2),
    .admin-card-invoice .items-table td:nth-child(2) {
        min-width: 120px;
    }
}

/* Förbättra table-container för admin */
.admin-card-invoice .table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

/* Se till att tabellen följer containerbredden */
.admin-card-invoice .table-responsive {
    width: 100%;
    overflow-x: auto;
}


/* Order details styles */

.summary-item {
    min-width: 150px;
    flex: 1;
}

.amount-badge {
    display: flex;
    flex-direction: column;
    padding: 0.5em 0.75em;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
}

.amount-badge label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
}

.amount-badge.total {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #1976d2;
}

.amount-badge.invoice {
    background-color: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

.amount-badge.discount {
    background-color: #fff3e0;
    border-color: #ffcc80;
    color: #f57c00;
}

/* Specifik styling för order-summary i admin-sidan */
.admin-tools .order-summary {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 20px;
}

/* Gör alla amount-badges lika stora i admin-sektionen */
.admin-tools .amount-badge {
    flex: 1;
    min-width: 200px;
    max-width: 220px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    text-align: center;
    box-sizing: border-box;
}

/* Säkerställ att alla badges har samma typografi */
.admin-tools .amount-badge .badge-label {
    font-size: 0.75em;
    margin-bottom: 6px;
    color: #666;
    font-weight: 500;
    line-height: 1.2;
    min-height: 2em; /* Reserverar utrymme för två rader text */
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-card-invoice {

        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        padding: 20px;
        margin-bottom: 20px;
        width: 100%;
}

.admin-tools .amount-badge .badge-value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.1;
}

/* Ta bort skillnaderna mellan primary och secondary badges i admin */
.admin-tools .amount-badge.primary-badge,
.admin-tools .amount-badge.secondary-badge {
    padding: 10px;
    font-size: 0.85rem;
    flex: 1;
    min-width: 150px;
    max-width: 180px;
}

.admin-tools .amount-badge.primary-badge .badge-label,
.admin-tools .amount-badge.secondary-badge .badge-label {
    font-size: 0.75em;
}

.admin-tools .amount-badge.primary-badge .badge-value,
.admin-tools .amount-badge.secondary-badge .badge-value {
    font-size: 1.1em;
    font-weight: 600;
}

.admin-card .order-summary,
.admin-tools .search-container .order-summary {
    display: flex;
    flex-direction: row !important;
    gap: 20px;
    margin-bottom: 20px;
}

.badge-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}

.badge-value {
    font-size: 1.2em;
    font-weight: 500;
    color: var(--primary-color);
}

.items-table {
    margin-bottom: 1.5rem;
}

.frame-number-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.frame-number-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

/* When input has content (not showing placeholder) */
.frame-number-input:not(:placeholder-shown) {
    border-color: #a5d6a7;
    box-shadow: 0 0 0 2px rgba(165, 214, 167, 0.1);
}

/* When input is empty (showing placeholder) */
.frame-number-input:placeholder-shown {
    border-color: #ffcdd2;
    border-width: 2px;  /* Make the border thicker */
    box-shadow: 0 0 0 2px rgba(255, 205, 210, 0.15);  /* Slightly stronger shadow */
}

.invoice-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}


.invoice-input {
    min-width: 200px;
    flex: 3;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.registered-invoices {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.registered-invoices label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.invoice-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.invoice-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e3f2fd;
    color: #1565c0;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
}

.no-invoices {
    color: #888;
    font-style: italic;
}

.register-button {
    min-width: 120px;
    flex: 1;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
}

.register-button:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}


.section-header-with-edit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #007bff;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: #0056b3;
}

.customer-edit-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#customerEditButtons {
    display: flex;
    justify-content: flex-end;
}

/* Add search description styles */
.search-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0 0.5rem;
}

/* Add styles for opening windows modal */
#openingWindowsModal .modal-content {
    width: 75%;
    max-width: 900px;
}

#openingWindowsModal .data-table {
    width: 100%;
    margin-bottom: 0;
}

/* Add styles for open windows modal */
#openWindowsModal .modal-content {
    width: 75%;
    max-width: 900px;
}

#openWindowsModal .data-table {
    width: 100%;
    margin-bottom: 0;
}

/* Add styles for closing windows modal */
#closingWindowsModal .modal-content {
    width: 75%;
    max-width: 900px;
}

#closingWindowsModal .data-table {
    width: 100%;
    margin-bottom: 0;
}

/* Add chart styles */
.chart-container {
    position: relative;
    height: 150px !important; /* Force fixed height */
    padding: 0.5rem;
    margin-top: 1rem;
}

.card .chart-container {
    min-height: 120px;
    max-height: 150px; /* Add maximum height */
}

/* Add chart loading styles */
.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.chart-loading .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Order Central Specific Styles */
.order-details-container {
    margin-top: 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

.order-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(400px, 1.5fr);
    gap: 2rem;
    margin: 0 2rem 2rem 2rem; /* Add horizontal margins */
}

.order-left-column,
.order-right-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

.order-info-section,
.customer-info-section,
.product-info-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Table container adjustments */
.product-info-section .table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

.product-info-section .data-table {
    width: 100%;
    min-width: 600px;
}

/* Order summary adjustments */
.product-info-section .order-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.product-info-section .amount-badge {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .order-grid {
        grid-template-columns: 1fr;
    }
    
    .product-info-section .amount-badge {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .admin-card {
        padding: 15px 10px;
    }

    .admin-card h2 {
        font-size: 1.3rem;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
}


/* Specific right column padding for Ordercentral */
.order-details-container .order-right-column {
    padding-right: 2rem; /* Add padding to match the left side */
}

/* Ensure these styles only affect the Ordercentral page */
.order-details-container .order-grid {
    padding-right: 0; /* Reset any inherited padding */
    margin-right: 0; /* Reset any inherited margin */
}

/* Product table status backgrounds */
.bg-light-red {
    background-color: #ffebeb;  /* Light red */
    transition: background-color 0.2s ease;
}

.bg-light-red:hover {
    background-color: #ffb5b5 !important;  /* More intense light red */
}

.bg-white {
    background-color: #ffffff; /* Samma som var(--light-gray) */
    transition: background-color 0.2s ease;
}

.bg-white:hover {
    background-color: #dee0e4 !important; /* Lite mörkare vid hover */
}

.bg-light-yellow {
    background-color: #fffbe5;  /* Light yellow */
    transition: background-color 0.2s ease;
}

.bg-light-yellow:hover {
    background-color: #fbe77b !important;  /* More intense light yellow */
}

.bg-light-green {
    background-color: #ebffeb;  /* Light green */
    transition: background-color 0.2s ease;
}

.bg-light-green:hover {
    background-color: #bef8be !important;  /* More intense light green */
}

/* Event info section styles */
.event-info-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.event-info-section .info-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.event-info-section .info-group label {
    color: #666;
    font-weight: 500;
}

.event-info-section .fas {
    font-size: 1.2rem;
}

/* Comments section styles */
.comments-container {
    display: flex;
    flex-direction: column;
}

.comment {
    max-width: 85%; /* Gör rutorna lite smalare */
    padding: 0.75rem; /* Lite mindre padding */
    border-radius: 6px;
    margin: 0.4rem 0;
    font-size: 0.75rem; /* Gör texten lite mindre */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment.own-comment.sportson-comment {
    max-width: 85%;
}

.comment.customer-comment {
    background-color: #e3f2fd; /* Light blue background */
    margin-right: auto; /* Kundens kommentarer till vänster */
    border-left: 3px solid #2196f3;
}

.comment.sportson-comment {
    background-color: #fff3e0; /* Light yellow background */
    margin-left: auto; /* Sportsons kommentarer till höger */
    border-right: 3px solid #ff9800;
    max-width: 85%;
}
.comment-date {
    margin-left: 0.5rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem; /* lite mindre text */
    margin-bottom: 4px;
}




.comment-text {
    white-space: pre-wrap;
    line-height: 1.4;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 1rem;
}

/* Add hover styles for regular rows */
.product-info-section .data-table tr:hover {
    background-color: inherit;
}

/* Section header with comment indicators */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-indicators {
    display: flex;
    gap: 1rem;
}

.comment-indicator {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.comment-indicator:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.comment-indicator i {
    font-size: 1.2rem;
}

.comment-indicator.has-comments i {
    animation: pulse 2s infinite;
}

.comment-indicator.customer.has-comments i {
    color: #2196f3;
}

.comment-indicator.sportson.has-comments i {
    color: #ff9800;
}

.comment-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.comment-indicator.customer .comment-badge {
    background: #2196f3;
}

.comment-indicator.sportson .comment-badge {
    background: #ff9800;
}



/* Make all data descriptions bold */
.info-group label,
.badge-label,
.messages-section h3,
.product-info-section h3,
.order-info-section h3,
.customer-info-section h3,
.event-info-section h3,
.comments-section h3 {
    font-weight: 600;
}

/* Adjust table headers to match */
.data-table th {
    font-weight: 600;
}

/* Update status badge styles for new location */
.info-group .badge {
    padding: 0.35em 0.65em;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 4px;
    display: inline-block;
}

/* Validation status styles */
.validation-status {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: right;
}

.validation-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.85em;
    font-weight: 500;
    border-radius: 4px;
}

.validation-badge.status-red {
    background-color: #dc3545;
    color: white;
}

.validation-badge.status-yellow {
    background-color: #ffc107;
    color: #000;
}

.validation-badge.status-green {
    background-color: #28a745;
    color: white;
}

/* Product cell styles */
.product-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-name {
    font-size: 1em;
    display: flex;
    align-items: center;
}

.product-details {
    font-size: 0.85em;
    color: #666;
}

/* Product modal styles */
.product-modal {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh; /* Limit height to 90% of viewport height */
    overflow-y: auto; /* Add scrolling if content is too tall */
}

.product-image {
    width: 100%;
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow: hidden;

    display: flex;
    justify-content: center;   /* Centrerar horisontellt */
    align-items: center;       /* Centrerar vertikalt */
}

.product-image img {
    max-width: 30%;
    height: auto;
    border-radius: 4px;
    object-fit: contain; /* Maintain aspect ratio */
    max-height: 200px; /* Limit image height */
}

/* Ensure modal body doesn't overflow */
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table tr {
    border-bottom: 1px solid #eee;
}

.details-table tr:last-child {
    border-bottom: none;
}

.details-table td {
    padding: 0.75rem 0;
}

.details-table td:first-child {
    font-weight: 600;
    color: #666;
    width: 40%;
}

/* Make product table rows clickable */
.data-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Enhanced comment indicators */
.comment-indicators {
    display: flex;
    gap: 1rem;
}

.comment-indicator {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.comment-indicator:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.comment-indicator i {
    font-size: 1.2rem;
}

.comment-indicator.has-comments i {
    animation: pulse 2s infinite;
}

.comment-indicator.customer.has-comments i {
    color: #2196f3;
}

.comment-indicator.sportson.has-comments i {
    color: #ff9800;
}

.comment-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.comment-indicator.customer .comment-badge {
    background: #2196f3;
}

.comment-indicator.sportson .comment-badge {
    background: #ff9800;
}

/* Comments modal styles */
.add-comment-modal {
    max-width: 600px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.add-comment-modal .modal-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow-block: auto;
}

.add-comment-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.add-comment-modal textarea {
    width: 100%;
    font-size: 1rem;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    min-height: 120px;
}

.add-comment-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.comment-actions .btn {
    font-size: 0.7rem;
    padding: 3px 6px;
}

#saveCommentBtn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
}

#saveCommentBtn:hover {
    background-color: darkgreen;
}

#saveCustomerBtn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
}

#saveCustomerBtn:hover {
    background-color: darkgreen;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Connected info styles */
.not-connected {
    background-color: #ffebeb;
    color: #842029;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Dashboard table styles */
.dashboard-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 1rem;
}

.dashboard-table-container table {
    width: 100%;
    margin-bottom: 0; /* Remove bottom margin since container handles spacing */
}

/* Keep header fixed while scrolling */
.dashboard-table-container thead {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Add some padding to the last row to account for potential scrollbar */
.dashboard-table-container tbody tr:last-child td {
    border-bottom: none;
}

/* Style scrollbar for better visibility */
.dashboard-table-container::-webkit-scrollbar {
    width: 8px;
}

.dashboard-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dashboard-table-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.dashboard-table-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.product-info-section.marked-for-deletion {
    background-color: #dc3545;
    border-radius: 8px;
    padding: 10px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Admin page styles */
.admin-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    width: 100%;
}

.admin-column {
    min-width: 300px;
    flex: 1;

}

.admin-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.admin-card h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #333;
}

.admin-tools {
    min-height: 200px;
}

.admin-tools h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.invoice-registration,
.bg-validation,
.kal-check {
    margin-bottom: 2rem;
}

/* Keep existing tool-specific styles */

@media (max-width: 1200px) {
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.action-cell {
    text-align: center;
}

.ou-break-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    width: fit-content;
}

.ou-break-btn:hover {
    background-color: #218838;
}

.detail-group .ou-break-btn {
    margin-left: 0;
    display: block;
}

.ou-break-btn.disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.ou-break-btn.disabled:hover {
    background-color: #6c757d;
}

/* Add these styles for the OU break modal */
#ouBreakModal .modal-content {
    max-width: 800px;
    width: 90%;
}

#ouBreakModal .modal-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

#ouBreakModal .text-center {
    text-align: center;
}

#ouBreakModal .order-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#ouBreakModal .empty-cell {
    padding: 1rem;
    text-align: center;
    color: #666;
}

.ineligible-orders-text {
    margin-bottom: 1rem;
    padding: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

#ouBreakConfirmModal .modal-content {
    max-width: 500px;
    width: 90%;
}

#ouBreakConfirmModal .modal-body {
    padding: 20px;
}

#ouBreakConfirmModal .modal-body p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

#ouBreakConfirmModal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#ouBreakConfirmModal .btn {
    padding: 8px 16px;
}

.data-table td {
    text-align: center;
}

.data-table td:first-child {
    text-align: left;
}

.highlight-no {
    background-color: #f8d7da;
    color: #721c24;
}

/* Ljusgrön cell för Ja */
.highlight-yes {
    background-color: #d4edda;
    color: #155724;
}

.row-deleted {
    background-color: #cf1c3c;
    color: #ffffff;
}

.row-deleted a {
    color: #ffffff !important;
}

.row-deleted:hover {
    background-color: #ef788f !important;
    color: #ffffff !important;
}

/* Hindra highlight-no från att synas i makulerade rader */
.row-deleted td.highlight-no {
    background-color: inherit !important;
    color: inherit !important;
}

.row-deleted:hover {
    background-color: #ffcdd2;
}

.row-deleted a {
    color: #c62828;
}

.orders-section .sortable {
    cursor: pointer;
    user-select: none;
}

.orders-section .sortable i {
    margin-left: 5px;
}

.orders-section .sortable:hover {
    background-color: #f5f5f5;
}

.bg-generation-controls {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.bg-generation-controls input[type="date"] {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.bg-generation-controls button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.success-banner {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    z-index: 9999;
    animation: slideInLeft 0.3s ease-out, slideOutLeft 0.3s ease-out 3s forwards;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.success-banner-success {
    background-color: #28a745;
}

.success-banner-error {
    background-color: #dc3545;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Force all .data-table td to be left-aligned */
.data-table td {
    text-align: left !important;
}

.row-approved {
    background-color: #d4edda !important;
    color: #155724;
}
.row-approved:hover {
    background-color: #b6e6c5 !important;
}


/* Checkbox container */
.watch-checkbox-container {
    margin-bottom: 15px;
}

.watch-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.watch-checkbox-label:hover {
    opacity: 0.8;
}

.watch-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.watch-checkbox-label span {
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
}

/* Comment section */
.watch-comment-section {
    animation: slideDown 0.3s ease;
}

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

.watch-comment-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

.watch-comment-input {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.watch-comment-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.watch-comment-input::placeholder {
    color: #999;
}

.watch-save-btn {
    margin-top: 12px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    background-color: #48CF48
}

.watch-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.watch-save-btn:active {
    transform: translateY(0);
}

/* Responsiv design */
@media (max-width: 768px) {
    .admin-card-watch {
        max-width: 100%;
    }
}

/* Period Loader Animation - Blue Palette */
.period-loader-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3a8a;
  user-select: none;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.period-loader {
  width: 20px;
  height: 20px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: period-loader-rotate 1.5s linear infinite;
  z-index: 0;
}

@keyframes period-loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 1px 1px 0 #3b82f6 inset,
      0 3px 5px 0 #60a5fa inset,
      0 4px 4px 0 #2563eb inset;
  }
  50% {
    transform: rotate(270deg);
    background: #1e40af;
    box-shadow:
      0 1px 1px 0 #93c5fd inset,
      0 3px 5px 0 #3b82f6 inset,
      0 4px 4px 0 #60a5fa inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 1px 1px 0 #3b82f6 inset,
      0 3px 5px 0 #60a5fa inset,
      0 4px 4px 0 #2563eb inset;
  }
}

.period-letter-wrapper {
  display: flex;
  gap: 1px;
}

.period-loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: period-loader-letter-anim 2s infinite;
  z-index: 1;
  border-radius: 50ch;
  border: none;
  font-weight: 600;
  color: #1e3a8a;
}

.period-loader-letter:nth-child(1) {
  animation-delay: 0s;
}
.period-loader-letter:nth-child(2) {
  animation-delay: 0.1s;
}
.period-loader-letter:nth-child(3) {
  animation-delay: 0.2s;
}
.period-loader-letter:nth-child(4) {
  animation-delay: 0.3s;
}
.period-loader-letter:nth-child(5) {
  animation-delay: 0.4s;
}
.period-loader-letter:nth-child(6) {
  animation-delay: 0.5s;
}
.period-loader-letter:nth-child(7) {
  animation-delay: 0.6s;
}

@keyframes period-loader-letter-anim {
  0%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.15);
  }
  40% {
    opacity: 0.7;
    transform: translateY(0);
  }
}

.dashboard-table-container {
  position: relative;
  min-height: 200px;
}

