    /* ===================================
   COFFEE SHOP APPLICATION - MAIN STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --danger-color: #f44336;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --dark-color: #333;
    --light-color: #f5f5f5;
    --gray-color: #999;
    --border-color: #ddd;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navbar {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-brand a:hover {
    color: var(--secondary-color);
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.navbar-menu a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

.user-menu {
    position: relative;
}

.user-menu > a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    display: none;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown li a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
}

.dropdown li a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* Alerts */
.alert {
    padding: 16px 18px;
    margin-bottom: 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    border-left: 5px solid #ddd;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    background: #fff;
    animation: slideUp 0.35s ease-out;
}

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    align-items: center;
}

.toast {
    min-width: 280px;
    max-width: 380px;
    pointer-events: auto;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    /* Fallback background for browsers without backdrop-filter */
    background: rgba(255, 255, 255, 0.95);
    border-left-width: 6px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Apply blurred backdrop only when supported (and include WebKit prefix for Safari) */
@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
    .toast {
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        /* slightly more transparent when blur applied */
        background: rgba(255, 255, 255, 0.80);
    }
} 

.alert-success .toast-icon {
    background: #2e7d32;
}

.alert-danger .toast-icon {
    background: #c62828;
}

.alert-warning .toast-icon {
    background: #ef6c00;
}

.alert-info .toast-icon {
    background: #1565c0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.toast-close {
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 2px 6px;
}

.toast-close:hover {
    opacity: 1;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.08) 0%, rgba(244, 67, 54, 0.02) 100%);
    border-left-color: #f44336;
    border-color: rgba(244, 67, 54, 0.25);
    color: #b3261e;
}

.alert-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.02) 100%);
    border-left-color: #4caf50;
    border-color: rgba(76, 175, 80, 0.25);
    color: #1b5e20;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.12) 0%, rgba(255, 152, 0, 0.03) 100%);
    border-left-color: #ff9800;
    border-color: rgba(255, 152, 0, 0.28);
    color: #7a4e00;
}

.alert-info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(33, 150, 243, 0.02) 100%);
    border-left-color: #2196f3;
    border-color: rgba(33, 150, 243, 0.25);
    color: #0d47a1;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover {
    background: var(--secondary-color);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #388e3c;
}

.btn-warning {
    background: var(--warning-color);
}

.btn-warning:hover {
    background: #f57c00;
}

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #555;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-bottom: 20px;
}

.table thead {
    background: var(--light-color);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    color: var(--dark-color);
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.table tr:hover {
    background: #fafafa;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-actions a,
.table-actions button {
    padding: 6px 12px;
    font-size: 12px;
}

/* Cards */
.card {
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    color: var(--dark-color);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 20px;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Grid */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.col {
    display: flex;
    flex-direction: column;
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }

/* Stats Cards */
.stat-card {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stat-card .icon {
    font-size: 32px;
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .content h4 {
    margin: 0;
    color: var(--gray-color);
    font-size: 12px;
    text-transform: uppercase;
}

.stat-card .content p {
    margin: 5px 0 0 0;
    font-size: 24px;
    font-weight: bold;
    color: var(--dark-color);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Products */
.product-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-color);
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.product-info p {
    margin: 0 0 10px 0;
    color: var(--gray-color);
    font-size: 13px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-actions {
    display: flex;
    gap: 5px;
}

.product-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-decoration: none;
    color: var(--dark-color);
    transition: background 0.3s;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer p {
    margin: 0;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        gap: 15px;
        font-size: 14px;
    }
    
    .navbar-brand a {
        font-size: 18px;
    }
    
    .row, .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    .table-actions {
        flex-direction: column;
    }
}
