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

:root {
    --coffee-primary: #7E481C;
    --coffee-primary-rgb: 126, 72, 28;
    --coffee-hover: #633714;
    --coffee-light: #FDFBF9;
    --coffee-dark: #231307;
    --coffee-dark-sidebar: #1A0D05;
    
    --bg-base: #f9f8f6;
    --text-main: #332720;
    --text-muted: #8b7d75;
    --border-color: #eeeae6;
    
    --card-shadow: 0 12px 30px -10px rgba(126, 72, 28, 0.06), 0 4px 12px -5px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 20px 40px -10px rgba(126, 72, 28, 0.12), 0 8px 24px -5px rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.1px;
}

h1, h2, h3, h4, h5, h6, .fw-bold {
    font-weight: 700 !important;
}

/* Custom Card Layouts */
.card-custom {
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    background-color: #ffffff;
    box-shadow: var(--card-shadow) !important;
    transition: var(--transition-smooth) !important;
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--card-shadow-hover) !important;
    transform: translateY(-2px);
}

/* Typography Colors */
.text-coffee {
    color: var(--coffee-primary) !important;
}

/* Buttons Styling */
.bg-coffee {
    background-color: var(--coffee-primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--coffee-primary) !important;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(126, 72, 28, 0.15);
}

.bg-coffee:hover {
    background-color: var(--coffee-hover) !important;
    border-color: var(--coffee-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(126, 72, 28, 0.25);
    transform: translateY(-1px);
}

.bg-coffee:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(126, 72, 28, 0.15);
}

.btn-outline-coffee {
    border: 1px solid var(--coffee-primary) !important;
    color: var(--coffee-primary) !important;
    background-color: transparent !important;
    transition: var(--transition-smooth);
}

.btn-outline-coffee:hover {
    background-color: var(--coffee-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(126, 72, 28, 0.15);
}

/* Form Controls & Styling */
.form-control, .form-select {
    border: 1px solid #dcd5cf !important;
    background-color: #ffffff !important;
    border-radius: 10px !important;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    color: var(--text-main) !important;
    transition: var(--transition-smooth) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--coffee-primary) !important;
    box-shadow: 0 0 0 4px rgba(126, 72, 28, 0.1) !important;
    background-color: #ffffff !important;
}

.form-label {
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #55483e;
}

/* Sidebar Custom Styling */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    width: 260px;
    background: var(--coffee-dark-sidebar);
    color: #ffffff;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.sidebar-scrollzone {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-scrollzone::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scrollzone::-webkit-scrollbar-thumb {
    background: rgba(126, 72, 28, 0.3);
    border-radius: 4px;
}

#sidebar .nav-link {
    color: #ab9c91;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 10px;
    margin: 4px 16px;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

#sidebar .nav-link i {
    font-size: 1.15rem;
    transition: var(--transition-smooth);
}

#sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

#sidebar .nav-link.active {
    background: var(--coffee-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(126, 72, 28, 0.25);
}

#sidebar .nav-link.active i {
    color: #ffffff !important;
}

/* Main Content Wrapper */
.main-content-wrapper {
    flex-grow: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: #ffffff !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 var(--border-color);
}

/* Tables styling */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--coffee-light) !important;
    color: #55483e !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 14px 16px !important;
    border-bottom: 2px solid var(--border-color) !important;
}

.table td {
    padding: 16px 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-main);
    font-size: 0.88rem;
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table-hover tbody tr {
    transition: var(--transition-smooth);
}

.table-hover tbody tr:hover {
    background-color: rgba(126, 72, 28, 0.01) !important;
}

/* Badges styling */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 30px;
    font-size: 0.72rem;
}

/* Custom Alert styling */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
}

/* Modals Animation Scale */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: var(--transition-smooth);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

.modal-content {
    border-radius: 20px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    padding: 20px 24px !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
    padding: 16px 24px !important;
}

/* Login Page Styling */
.login-container {
    background: radial-gradient(circle at 10% 20%, rgb(253, 251, 247) 0%, rgb(240, 233, 224) 90.1%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-login {
    border: 1px solid var(--border-color) !important;
    border-radius: 24px !important;
    box-shadow: 0 30px 60px -15px rgba(35, 19, 7, 0.1) !important;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    overflow: hidden;
    transition: var(--transition-smooth);
}

/* Tab Pills Styling */
.nav-pills {
    background-color: #eeeae6 !important;
    padding: 6px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    gap: 4px;
}

.nav-pills .nav-link {
    border-radius: 10px !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    background-color: transparent !important;
    transition: var(--transition-smooth) !important;
    border: none !important;
}

.nav-pills .nav-link.active {
    background-color: var(--coffee-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(126, 72, 28, 0.15) !important;
}

.nav-pills .nav-link:not(.active):hover {
    background-color: rgba(126, 72, 28, 0.05) !important;
    color: var(--coffee-primary) !important;
}

/* Quotes Box */
.quote-box {
    background-color: var(--coffee-light);
    border: 1px solid var(--border-color) !important;
    border-radius: 16px;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: #dcd5cf;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ab9c91;
}

/* Touch targets & UI refinements */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        z-index: 1040;
        height: 100%;
        margin-left: -260px;
        transition: var(--transition-smooth);
    }
    #sidebar.active {
        margin-left: 0 !important;
    }
}
