/* Tim Hortons Brand Colors */
:root {
    --th-red: #C8102E;
    --th-cream: #FFF8DC;
    --th-brown: #8B4513;
    --th-gold: #FFD700;
    --th-dark: #2C1810;
    --th-light-gray: #F5F5F5;
    --th-border: #E0E0E0;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--th-cream) 0%, #ffffff 100%);
    color: var(--th-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, var(--th-red) 0%, #a50d26 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(200, 16, 46, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2.5em;
    color: var(--th-gold);
}

.logo h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 300;
}

.role-toggle {
    display: flex;
    gap: 10px;
}

.role-btn {
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.role-btn.active {
    background: white;
    color: var(--th-red);
    border-color: white;
    font-weight: 600;
}

/* View Sections */
.view-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--th-red);
}

.section-header h2 {
    color: var(--th-red);
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header p {
    color: #666;
    font-size: 1.05em;
}

/* Form Styles */
.request-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--th-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.form-group label i {
    color: var(--th-red);
    width: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--th-border);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--th-red);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.form-group select {
    cursor: pointer;
}

.form-group select:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Styles */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--th-border);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--th-red) 0%, #a50d26 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200, 16, 46, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid;
}

.stat-card.pending { border-left-color: #ffc107; }
.stat-card.in-progress { border-left-color: #007bff; }
.stat-card.completed { border-left-color: #28a745; }

.stat-card i {
    font-size: 2.5em;
    opacity: 0.7;
}

.stat-card.pending i { color: #ffc107; }
.stat-card.in-progress i { color: #007bff; }
.stat-card.completed i { color: #28a745; }

.stat-info h3 {
    font-size: 2em;
    font-weight: 700;
    margin: 0;
}

.stat-info p {
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 10px 15px;
    border: 2px solid var(--th-border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--th-red);
}

/* Production Queue */
.production-queue {
    display: grid;
    gap: 20px;
}

.request-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.request-card.urgent { border-left-color: #dc3545; }
.request-card.high { border-left-color: #fd7e14; }
.request-card.normal { border-left-color: #ffc107; }
.request-card.low { border-left-color: #28a745; }

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.request-id {
    font-weight: 700;
    color: var(--th-red);
    font-size: 1.1em;
}

.request-time {
    color: #666;
    font-size: 0.9em;
}

.request-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item i {
    color: var(--th-red);
    width: 16px;
}

.detail-label {
    font-weight: 600;
    min-width: 60px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-in-progress { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }

.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-urgent { background: #f8d7da; color: #721c24; }
.priority-high { background: #fdeaa7; color: #7d4e00; }
.priority-normal { background: #fff3cd; color: #856404; }
.priority-low { background: #d4edda; color: #155724; }

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--th-border);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

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

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* Active Requests */
.active-requests {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.active-requests h3 {
    color: var(--th-red);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.requests-list {
    display: grid;
    gap: 15px;
}

.request-summary {
    padding: 15px;
    border: 1px solid var(--th-border);
    border-radius: 8px;
    background: #f8f9fa;
}

.request-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.request-summary-details {
    font-size: 0.9em;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .request-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .request-details {
        grid-template-columns: 1fr;
    }
    
    .request-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8em;
    }
    
    .section-header {
        padding: 20px;
    }
    
    .request-form {
        padding: 20px;
    }
    
    .role-toggle {
        width: 100%;
    }
    
    .role-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.5s ease;
}

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

.success-message i {
    color: #155724;
    font-size: 1.2em;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading {
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Ready Product Alert Styles */
.ready-product-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.4s ease;
}

.alert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.alert-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 10001;
    border: 3px solid var(--th-red);
    animation: bounceIn 0.5s ease;
}

.alert-header {
    background: linear-gradient(135deg, var(--th-red) 0%, #a50d26 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.alert-header i {
    font-size: 2em;
    animation: bellRing 2s infinite;
}

.alert-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 700;
}

.alert-body {
    padding: 25px;
}

.alert-body h4 {
    color: var(--th-red);
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-align: center;
}

.alert-details {
    background: var(--th-light-gray);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.alert-details p {
    margin: 8px 0;
    font-size: 0.95em;
}

.alert-details strong {
    color: var(--th-dark);
    font-weight: 600;
    min-width: 80px;
    display: inline-block;
}

.alert-message {
    text-align: center;
    font-weight: 600;
    color: var(--th-red);
    font-size: 1.1em;
    margin: 15px 0 0 0;
}

.alert-actions {
    padding: 0 25px 25px;
    text-align: center;
}

.alert-actions .btn {
    font-size: 1.1em;
    padding: 15px 30px;
    min-width: 200px;
}

/* Ready Counter Styles */
.ready-counter {
    display: none;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
}

.counter-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.counter-badge.has-alerts {
    animation: pulse 2s infinite;
}

.counter-number {
    background: var(--th-gold);
    color: var(--th-dark);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
}

.counter-text {
    font-weight: 600;
}

/* Animations */
@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: scale(0.9) translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

@keyframes slideOut {
    from { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
    to { 
        opacity: 0; 
        transform: scale(0.9) translateY(-20px); 
    }
}

@keyframes bounceIn {
    0% { 
        transform: scale(0.3) rotate(-10deg); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1.05) rotate(2deg); 
    }
    70% { 
        transform: scale(0.95) rotate(-1deg); 
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

@keyframes bellRing {
    0%, 50%, 100% { 
        transform: rotate(0deg); 
    }
    10%, 30% { 
        transform: rotate(-10deg); 
    }
    20%, 40% { 
        transform: rotate(10deg); 
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05); 
    }
}

/* Responsive adjustments for alerts */
@media (max-width: 768px) {
    .alert-content {
        width: 95%;
        margin: 20px;
    }
    
    .alert-header {
        padding: 15px;
    }
    
    .alert-header h3 {
        font-size: 1.2em;
    }
    
    .alert-body {
        padding: 20px;
    }
    
    .alert-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .ready-counter {
        margin-left: 10px;
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* Ready Products List */
.ready-products-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 10px 0;
}

.ready-item {
    background: var(--th-light-gray);
    border-left: 4px solid var(--th-red);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
}

.ready-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.ready-item-header strong {
    color: var(--th-red);
    font-size: 1.05em;
}

.ready-time {
    font-size: 0.85em;
    color: #666;
}

.ready-item-details {
    color: var(--th-dark);
    line-height: 1.4;
}

.ready-item-details small {
    color: #666;
    font-style: italic;
}

/* Clickable counter */
.ready-counter {
    cursor: pointer;
    transition: all 0.3s ease;
}

.ready-counter:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}