/* ============================================================
   Jewel Cafe - Booking System Dashboard Theme
   Modern overrides for AdminLTE v3
   ============================================================ */

/* --- Sidebar --- */
.main-sidebar {
    background: linear-gradient(180deg, #111 0%, #1a1a1a 50%, #222 100%) !important;
}
.main-sidebar .sidebar {
    background: transparent;
}
.nav-sidebar > .nav-item > .nav-link {
    border-radius: 8px;
    margin: 2px 10px;
    transition: all 0.25s ease;
    color: rgba(255,255,255,0.8);
}
.nav-sidebar > .nav-item > .nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateX(4px);
}
.nav-sidebar > .nav-item > .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-sidebar .nav-icon {
    font-size: 1.15rem;
}
.brand-link {
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    background: rgba(0,0,0,0.2);
}
.user-panel {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* --- Cards --- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    margin-bottom: 1.25rem;
}
.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0 !important;
}
.card-header .card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a2e;
}
.card-body {
    padding: 1.25rem;
}
.card-footer {
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 12px 12px;
}

/* --- Tables --- */
.table {
    margin-bottom: 0;
}
.table thead th {
    border-bottom: 2px solid #e8e8e8;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 0.85rem 0.75rem;
    white-space: nowrap;
}
.table tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f2f2f2;
}
.table tbody tr {
    transition: background 0.15s ease;
}
.table tbody tr:hover {
    background: #f8f9ff;
}
.table-striped tbody tr:nth-of-type(odd) {
    background: #fafbfc;
}
.table-striped tbody tr:nth-of-type(odd):hover {
    background: #f0f2f7;
}
.table-borderless td, .table-borderless th {
    border: none;
}

/* --- Buttons --- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    transition: all 0.2s ease;
    border: none;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background: #333333;
}
.btn-primary:hover {
    background: #0c0c0c;
    box-shadow: 0 4px 14px rgba(159, 159, 159, 0.35);
}
.btn-danger {
    background: #de1122;
}
.btn-danger:hover {
    background: #c50e1d;
    box-shadow: 0 4px 14px rgba(222,17,34,0.3);
}
.btn-success {
    background: #10b981;
}
.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}
.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 4px 14px rgba(108,117,125,0.3);
}
.btn-info {
    background: #de1122;
}
.btn-info:hover {
    background: #b80e1b;
}
.btn-light {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}
.btn-light:hover {
    background: #e5e7eb;
}

/* --- Form Controls --- */
.form-control {
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    border-color: #de1122;
    box-shadow: 0 0 0 3px rgba(222,17,34,0.12);
}
.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.4rem;
}
select.form-control {
    cursor: pointer;
}
.custom-file-label {
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
}

/* --- Badges --- */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-size: 0.8rem;
}
.badge-primary {
    background: #fef2f2;
    color: #de1122;
}
.badge-info {
    background: #eff6ff;
    color: #de1122;
    padding: 0.3em 0.7em;
}

/* --- Breadcrumbs --- */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}
.breadcrumb-item a {
    color: #de1122;
}
.breadcrumb-item.active {
    color: #6c757d;
}

/* --- Alerts --- */
.alert {
    border-radius: 10px;
    border: none;
}
.alert-success {
    background: #ecfdf5;
    color: #065f46;
}
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* --- Pagination --- */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: #de1122;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.pagination .page-link:hover {
    background: #fef2f2;
}
.pagination .page-item.active .page-link {
    background: #de1122;
    box-shadow: 0 2px 8px rgba(222,17,34,0.3);
}
.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background: transparent;
}

/* --- Modals --- */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 1.25rem 1.5rem;
}
.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 1rem 1.5rem;
}

/* --- Navbar --- */
.main-header.navbar {
    background: #1a1a1a !important;
    border-bottom: 1px solid #2a2a2a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* --- Content Header --- */
.content-header h1 {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a1a2e;
}

/* --- Filter Forms --- */
.filter-form .form-control {
    margin-bottom: 0;
}
.filter-form label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.35rem;
}

/* --- Footer Readability --- */
.footer-read {
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    color: #6c757d;
}

/* --- Misc Helpers --- */
.font-weight-600 {
    font-weight: 600;
}
.text-muted-dark {
    color: #6c757d;
}
.rounded-10 {
    border-radius: 10px;
}

/* --- Responsive improvements --- */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
    }
    .card-header {
        padding: 0.85rem 1rem;
    }
    .table thead th,
    .table tbody td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }
    .content-header h1 {
        font-size: 1.25rem;
    }
}

/* --- Checkbox/radio styling --- */
input[type="checkbox"], input[type="radio"] {
    accent-color: #de1122;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    cursor: pointer;
}

/* --- Sortable (shop timeslots) --- */
#sortable li {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 15px !important;
    margin-bottom: 6px !important;
    font-size: 0.9rem !important;
}
#sortable li:hover {
    background: #f0f2f7;
    border-color: #d1d5db;
}
#sortable li .ui-icon {
    cursor: grab;
    color: #9ca3af;
}
#sortable li .ui-icon:active {
    cursor: grabbing;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
    background: linear-gradient(135deg, #0a0a0a 0%, #111 40%, #1a1a1a 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.04) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.02) 0%, transparent 50%);
    animation: loginBgShift 20s ease-in-out infinite alternate;
}
@keyframes loginBgShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-2%, -2%) rotate(3deg); }
}

.login-box {
    width: 420px;
    max-width: 95vw;
    position: relative;
    z-index: 1;
    animation: loginFadeIn 0.6s ease-out;
}
@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    margin-bottom: 1.5rem;
    text-align: center;
}
.login-logo a {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
    line-height: 1.3;
}
.login-logo a:hover {
    color: #fff;
}
.login-logo .logo-icon {
    display: block;
    margin: 0 auto 0.75rem;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #de1122, #de1122);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(222,17,34,0.35);
}
.login-logo .logo-icon i {
    font-size: 1.8rem;
    color: #fff;
}

.login-box .card {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 8px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}
.login-card-body {
    padding: 2rem 2.25rem 1.75rem;
}
.login-card-body .login-box-msg {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.login-box .input-group {
    margin-bottom: 1rem !important;
}
.login-box .form-control {
    height: 48px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px 0 0 10px !important;
    padding-left: 1rem;
    font-size: 0.925rem;
    transition: all 0.25s ease;
}
.login-box .form-control:focus {
    border-color: #de1122;
    box-shadow: 0 0 0 3px rgba(222,17,34,0.12);
}
.login-box .input-group-text {
    border-radius: 0 10px 10px 0 !important;
    background: #f8f9fa;
    border: 1.5px solid #e5e7eb;
    border-left: none;
    color: #9ca3af;
    padding: 0 1rem;
}
.login-box .input-group:focus-within .input-group-text {
    border-color: #de1122;
    color: #de1122;
}

.login-box .btn-primary {
    height: 48px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #de1122, #de1122);
    border: none;
    box-shadow: 0 4px 14px rgba(222,17,34,0.3);
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}
.login-box .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74,108,247,0.4);
}
.login-box .btn-primary:active {
    transform: translateY(0);
}

.login-box .row {
    margin-top: 0.5rem;
}

/* Footer credit */
.login-page .login-copy {
    position: fixed;
    bottom: 1rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    z-index: 1;
}

.main-header.navbar .navbar-nav .nav-link,
.main-header.navbar .navbar-nav .nav-link i {
    color: rgba(255,255,255,0.85);
}
.main-header.navbar .navbar-nav .nav-link:hover {
    color: #fff;
}

/* ============================================================
   Button Color Variants
   ============================================================ */
.btn-purple {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(124,58,237,0.3);
}
.btn-purple:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,0.35);
}

.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.btn-blue:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.35);
}

/* ============================================================
   Login Input Group Focus Fix
   ============================================================ */
.login-box .input-group:focus-within .input-group-text {
    border-color: #de1122 !important;
    color: #de1122 !important;
}
.login-box .input-group:focus-within .form-control {
    border-color: #de1122 !important;
    /* box-shadow: 0 0 0 3px rgba(222,17,34,0.12) !important; */
}
