/* CoffeeWorx Manager - Main Styles */

/* Reset and Base Styles */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f8f9fa; 
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.header { 
    background: white; 
    padding: 20px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.logo { 
    font-size: 24px; 
    font-weight: 600; 
    color: #667eea; 
}

.nav-links { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
}

.nav-link { 
    padding: 8px 16px; 
    background: #667eea; 
    color: white; 
    text-decoration: none; 
    border-radius: 4px; 
    transition: background 0.3s;
}

.nav-link:hover { 
    background: #5a67d8; 
}

.user-info { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.logout-btn { 
    padding: 8px 16px; 
    background: #e53e3e; 
    color: white; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer;
}

.logout-btn:hover { 
    background: #c53030; 
}

/* Main Content */
.main-content { 
    padding: 30px; 
    max-width: 1200px; 
    margin: 0 auto;
}

.page-title {
    font-size: 28px; 
    font-weight: 600; 
    color: #2d3748; 
    margin-bottom: 30px; 
    text-align: center;
}

/* Card Components */
.card {
    background: white; 
    padding: 30px; 
    border-radius: 15px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.action-card {
    background: white; 
    padding: 25px; 
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    text-align: center;
    transition: all 0.3s; 
    cursor: pointer; 
    text-decoration: none;
    color: inherit; 
    border: 1px solid #e2e8f0;
}

.action-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.action-icon {
    font-size: 48px; 
    margin-bottom: 15px; 
    display: block;
}

.action-title {
    font-size: 18px; 
    font-weight: 600; 
    color: #2d3748; 
    margin-bottom: 8px;
}

.action-description {
    color: #718096; 
    font-size: 14px; 
    line-height: 1.4;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px; 
    text-align: left;
}

.form-label {
    display: block; 
    margin-bottom: 5px; 
    color: #555; 
    font-weight: 500;
}

.form-input {
    width: 100%; 
    padding: 12px; 
    border: 2px solid #ddd; 
    border-radius: 6px; 
    font-size: 16px; 
    transition: border-color 0.3s;
}

.form-input:focus { 
    border-color: #667eea; 
    outline: none; 
}

/* Buttons */
.btn {
    padding: 12px 25px; 
    border: none; 
    border-radius: 8px; 
    font-size: 16px;
    cursor: pointer; 
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea; 
    color: white;
}

.btn-primary:hover { 
    background: #5a67d8; 
}

.btn-secondary {
    background: #e2e8f0; 
    color: #4a5568;
}

.btn-secondary:hover { 
    background: #cbd5e0; 
}

.btn-success {
    background: #38a169; 
    color: white;
}

.btn-success:hover { 
    background: #2f855a; 
}

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

.btn-danger:hover { 
    background: #c53030; 
}

/* Grid Layouts */
.quick-actions {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; 
    margin-bottom: 30px;
}

.tables-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; 
    margin-bottom: 40px;
}

.cafes-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

/* Loading States */
.loading {
    text-align: center; 
    padding: 40px; 
    color: #667eea;
    font-size: 18px; 
    animation: pulse 2s infinite;
}

@keyframes pulse { 
    0%, 100% { opacity: 0.6; } 
    50% { opacity: 1; } 
}

.spinner {
    border: 4px solid #f3f4f6; 
    border-top: 4px solid #667eea;
    border-radius: 50%; 
    width: 40px; 
    height: 40px;
    animation: spin 1s linear infinite; 
    margin: 0 auto 15px;
}

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

/* Message States */
.error-message {
    background: #fed7d7; 
    color: #c53030; 
    padding: 15px;
    border-radius: 8px; 
    margin: 20px 0; 
    text-align: center;
}

.success-message {
    background: #c6f6d5; 
    color: #22543d; 
    padding: 15px; 
    border-radius: 8px;
    margin: 20px 0; 
    text-align: center;
}

/* Table Styles */
.table-container {
    background: white; 
    border-radius: 10px; 
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 100%;
}

.data-table {
    width: 100%; 
    border-collapse: collapse; 
    min-width: 800px;
}

.data-table th {
    background: #667eea; 
    color: white; 
    padding: 12px 10px;
    text-align: left; 
    font-weight: 600; 
    border-bottom: 1px solid #5a67d8;
    white-space: nowrap; 
    font-size: 13px; 
    position: sticky; 
    top: 0;
    border-right: 1px solid #5a67d8;
}

.data-table td {
    padding: 10px; 
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9; 
    font-size: 13px;
    max-width: 200px; 
    overflow: hidden; 
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .main-content { 
        padding: 15px; 
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .quick-actions,
    .tables-grid,
    .cafes-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
