/* Material Design Styles for Glass Order System */

:root {
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --accent-color: #ff4081;
    --text-primary: #212121;
    --text-secondary: #757575;
    --divider-color: #bdbdbd;
    --background: #fafafa;
    --surface: #ffffff;
    --error: #f44336;
    --success: #4caf50;
    --warning: #ff9800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Material Design Elevation Shadows */
.elevation-1 {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.elevation-2 {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.elevation-3 {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.elevation-4 {
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Card */
.card {
    background: var(--surface);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 500;
}

.header-nav {
    display: flex;
    gap: 16px;
}

.header-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.header-nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--divider-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--surface);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--text-primary);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background: #e91e63;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #388e3c;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--error);
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid var(--primary-color);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--divider-color);
}

.table th {
    background: var(--background);
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: var(--background);
}

.table-responsive {
    overflow-x: auto;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-primary {
    background: var(--primary-light);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.auth-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.auth-card h2 {
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: center;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-bar input {
    flex: 1;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .header-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .header-nav a {
        text-align: center;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .auth-card {
        padding: 24px;
        margin: 20px;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
    }
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    border: 4px solid var(--divider-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
