/**
 * Customer Portal Styles
 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #8b7355;
    --accent-color: #d4a574;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --light-bg: #f8f6f3;
    --border-color: #e5e7eb;
    --text-muted: #6b7280;
}

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

body {
    font-family: 'EB Garamond', Georgia, serif;
    background: var(--light-bg);
    color: var(--primary-color);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ============================================
   Login Page
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f6f3 0%, #efe9e0 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-decoration: none;
}

.login-header p {
    color: var(--text-muted);
    margin-top: 5px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.login-box h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group label i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(139, 115, 85, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.4);
}

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.login-footer a {
    color: var(--secondary-color);
    font-weight: 600;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.back-link a:hover {
    color: var(--secondary-color);
}

/* ============================================
   Dashboard Page
   ============================================ */

.dashboard-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-header .logo h1 {
    font-size: 1.4rem;
    color: var(--primary-color);
}

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

.user-name {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    color: var(--accent-color);
}

.dashboard-main {
    padding: 40px 0;
}

.welcome-section {
    margin-bottom: 40px;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.welcome-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Sections */
section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

section h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

section h3 i {
    color: var(--secondary-color);
}

/* Books Section */
.book-cards {
    display: grid;
    gap: 20px;
}

.book-card {
    display: flex;
    gap: 25px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 16px;
}

.book-cover {
    flex-shrink: 0;
    width: 120px;
}

.book-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-info h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.book-format {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.book-format i {
    color: var(--error-color);
}

.coming-soon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 50px;
    font-size: 0.95rem;
}

/* Orders Table */
.orders-table-wrapper {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.orders-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table tr:last-child td {
    border-bottom: none;
}

.order-id {
    font-family: monospace;
    font-size: 0.95rem;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-error {
    background: #fef2f2;
    color: #dc2626;
}

.status-muted {
    background: #f3f4f6;
    color: #6b7280;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Account Info */
.account-info {
    display: grid;
    gap: 15px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 150px;
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    flex: 1;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--border-color);
}

.empty-state p {
    margin-bottom: 20px;
}

/* Footer */
.dashboard-footer {
    background: white;
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .book-card {
        flex-direction: column;
        text-align: center;
    }

    .book-cover {
        width: 150px;
        margin: 0 auto;
    }

    .orders-table th,
    .orders-table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }

    section {
        padding: 20px;
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
    }

    .info-label {
        width: auto;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 25px;
    }

    .welcome-section h2 {
        font-size: 1.5rem;
    }
}
