/* ================================================
   ArtworkHub SA — Artist Portal Styles
   Extends design system from index.php
   ================================================ */

:root {
    --primary:   #2c2416;
    --secondary: #8b7355;
    --accent:    #c9a87c;
    --light:     #f5f1eb;
    --white:     #ffffff;
    --text:      #3a3a3a;
    --sidebar-w: 260px;
    --danger:    #c0392b;
    --success:   #27ae60;
    --warning:   #e67e22;
    --border:    #e0d8cc;
}

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

body {
    font-family: 'Arial', sans-serif;
    color: var(--text);
    background: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ================================================
   AUTH PAGES (login, register)
   ================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light) 0%, #e8dfd3 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    width: 100%;
    max-width: 480px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo a {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.auth-logo .sub {
    display: block;
    font-size: 0.85rem;
    color: var(--secondary);
    font-family: 'Arial', sans-serif;
    margin-top: 0.25rem;
}

.auth-card h1 {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.auth-card .auth-sub {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ================================================
   FORMS
   ================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-family: 'Arial', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-radius: 2px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 124, 0.15);
}

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

.form-group .hint {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 0.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.form-check input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: 'Arial', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn-accent {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}
.btn-danger:hover { opacity: 0.85; }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-block { width: 100%; text-align: center; }

/* ================================================
   ALERTS
   ================================================ */
.alert {
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.25rem;
    border-left: 4px solid;
    font-size: 0.9rem;
    border-radius: 2px;
}
.alert-success { background: #eafaf1; border-color: var(--success); color: #1e8449; }
.alert-error   { background: #fdf2f2; border-color: var(--danger);  color: var(--danger); }
.alert-warning { background: #fef9f0; border-color: var(--warning); color: #a04000; }
.alert-info    { background: #eaf4fb; border-color: #2980b9; color: #1a5276; }

/* ================================================
   PORTAL LAYOUT (sidebar + content)
   ================================================ */
.portal-wrap {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-logo {
    padding: 1.8rem 1.5rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo a {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.5px;
    display: block;
}

.sidebar-logo .portal-label {
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 0.2rem;
    font-family: 'Arial', sans-serif;
}

.sidebar-user {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sidebar-user-info .name {
    font-size: 0.85rem;
    color: var(--white);
    font-weight: 600;
}
.sidebar-user-info .role {
    font-size: 0.72rem;
    color: var(--accent);
    text-transform: capitalize;
}

nav.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-section {
    padding: 0.6rem 1.5rem 0.3rem;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

.sidebar-nav a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(201,168,124,0.08);
}

.sidebar-nav .nav-icon {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

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

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.sidebar-footer a:hover { color: var(--white); }

/* Main content area */
.portal-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.portal-topbar {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 400;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-content {
    padding: 2rem;
    flex: 1;
}

/* ================================================
   DASHBOARD CARDS
   ================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-family: 'Georgia', serif;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--secondary);
}

/* ================================================
   CONTENT PANELS
   ================================================ */
.panel {
    background: var(--white);
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-family: 'Georgia', serif;
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 400;
}

/* ================================================
   TABLES
   ================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--light);
    color: var(--primary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

/* ================================================
   BADGES / STATUS
   ================================================ */
.badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 20px;
    text-transform: capitalize;
}

.badge-green   { background: #eafaf1; color: #1e8449; }
.badge-red     { background: #fdf2f2; color: #c0392b; }
.badge-gold    { background: #fef9ec; color: #a04000; }
.badge-grey    { background: #f0f0f0; color: #555; }

/* ================================================
   QUICK ACTIONS
   ================================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action {
    background: var(--white);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--primary);
    border: 2px solid var(--border);
    transition: all 0.2s;
    display: block;
}

.quick-action:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.quick-action .qa-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.quick-action .qa-label { font-size: 0.85rem; font-weight: 600; }

/* ================================================
   MOBILE
   ================================================ */
.sidebar-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .portal-main {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .portal-content { padding: 1rem; }
    .auth-card { padding: 2rem 1.5rem; }
}
