@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap");
/**
 * 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;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dashboard-header .logo {
    text-decoration: none;
    text-align: center;
}

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

.header-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-style: italic;
}

/* Letter-R image in titles */
.title-letter-r {
    height: auto;
    width: auto;
    display: inline;
    vertical-align: baseline;
    margin: 0 -2px;
}

.title-letter-r-portal {
    height: 1.9rem;
}

.title-letter-r-footer {
    height: 1.6rem;
    margin: 0 -2px;
    vertical-align: -0.1em;
}

.header-letter-r {
    height: 1.25rem;
    display: inline;
    vertical-align: baseline;
    margin: 0;
}

.script-word {
    white-space: nowrap;
}

.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;
}

/* ============================================
   Site Footer (matches main site)
   ============================================ */
.site-footer {
    background: linear-gradient(135deg, #2c2416 0%, #3d3226 50%, #1f1a14 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-top: 40px;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.footer-main {
    padding: 60px 2rem 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    text-align: center;
}

.footer-brand h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.7rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.footer-column {
    text-align: center;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 2rem;
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--accent-color);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .dashboard-header .container {
        gap: 8px;
    }

    .dashboard-header .logo h1 {
        font-size: 1.6rem;
    }

    .title-letter-r-portal {
        height: 1.5rem;
    }

    .header-subtitle {
        font-size: 1.05rem;
    }

    .header-letter-r {
        height: 1.05rem;
    }

    .dashboard-nav {
        gap: 10px;
    }

    .user-name {
        display: none;
    }

    .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: 18px;
        margin-bottom: 15px;
    }

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

    .info-label {
        width: auto;
    }

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

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

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

    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

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

    .dashboard-header {
        padding: 10px 0;
    }

    .dashboard-header .container {
        padding: 0 12px;
    }

    .dashboard-header .logo h1 {
        font-size: 1.35rem;
    }

    .title-letter-r-portal {
        height: 1.25rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
    }

    .header-letter-r {
        height: 0.9rem;
    }

    .dashboard-nav {
        gap: 6px;
        font-size: 0.85rem;
    }

    .lang-btn {
        padding: 0.25rem 0.45rem;
        font-size: 0.7rem;
    }

    .logout-btn {
        font-size: 0.85rem;
    }

    .container {
        padding: 0 12px;
    }

    section {
        padding: 15px;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    section h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

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

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

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

    .footer-main {
        padding: 40px 1rem 30px;
    }

    .footer-grid {
        gap: 1.5rem;
    }

    .footer-legal {
        gap: 1rem;
    }
}
