/* ---
Shared CSS for Portal
--- */

/* --- 1. Core Variables and Base --- */
:root{
    /* DYNAMIC VARS (set in header) */
    --accent: #ff7a00;
    --gold: #ffb347;
    --glow-shadow: 0 0 10px rgba(255,122,0,0.6);
    --accent-bg-faint: rgba(255, 122, 0, 0.15);
    --accent-bg-ultra-faint: rgba(255, 122, 0, 0.05);

    /* STATIC VARS */
    --text: #ffffff;
    --muted: #bdbdbd;
    --bg: #030303;
    --panel: #0d0d0d;
    --card-bg: rgba(255,255,255,.05);
    --ring: rgba(255,255,255,0.05);
    --font-heading: 'Orbitron', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --sidebar-width: 260px;
    --color-green: #4CAF50;
    --color-green-bg: rgba(76, 175, 80, 0.15);
    --color-orange: #ff9800;
    --color-orange-bg: rgba(255, 152, 0, 0.15);
}
*{box-sizing:border-box}

html {
    overflow-x: hidden;
}
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    height: 100%; /* Fix for full-height layout */
}
body{
    background: var(--bg);
    background-image: linear-gradient(0deg, var(--ring) 1px, transparent 1px),
                      linear-gradient(90deg, var(--ring) 1px, transparent 1px);
    background-size: 40px 40px;
    color:var(--text);
    font-family:var(--font-body);
    margin:0;
    line-height:1.6;
    min-height:100vh;
    display: grid;
    grid-template-columns: 1fr;
}
a{color:inherit;text-decoration:none}

/* --- 2. Sidebar Layout (from admin/artists.php) --- */
.sidebar {
    background: var(--panel);
    border-right: 1px solid var(--accent);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    max-width: 90%;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}
.sidebar.open {
    transform: translateX(0);
}
.sidebar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent);
    text-shadow: var(--glow-shadow);
    letter-spacing: 1px;
    font-weight: 800;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ring);
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}
.sidebar-nav .btn {
    display: flex; 
    justify-content: flex-start;
    background: none;
    border: 1px solid transparent;
    font-size: 1rem;
    text-transform: none;
    font-family: var(--font-body);
    font-weight: 500;
    padding: 10px 15px;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.sidebar-nav .btn:hover {
    background: var(--accent-bg-faint);
    border-color: var(--accent);
    color: var(--text);
    transform: none;
    box-shadow: none;
}
.sidebar-nav .btn.red {
    background: none;
    border: 1px solid transparent;
    color: #e04040;
}
.sidebar-nav .btn.red:hover {
    background: rgba(224, 64, 64, 0.1);
    border-color: #e04040;
    color: #ff4d4d;
    box-shadow: none;
}
.sidebar-nav .btn.logout-btn {
    margin-top: auto;
}
.page-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}
.page-overlay.open {
    display: block;
}

/* --- 3. Main Content Area (from admin/artists.php) --- */
.main-content {
    grid-column: 1 / -1; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--accent);
    background: var(--panel);
    position: sticky;
    top: 0;
    z-index: 100;
}
.menu-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
}
.mobile-header-brand {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent);
    text-shadow: var(--glow-shadow);
    font-weight: 800;
}

@media (min-width: 992px) {
    body {
        grid-template-columns: var(--sidebar-width) 1fr;
    }
    .sidebar {
        position: sticky; 
        top: 0;
        height: 100vh;
        transform: translateX(0);
        grid-column: 1 / 2;
    }
    .main-content {
        grid-column: 2 / -1; 
    }
    .mobile-header {
        display: none; 
    }
    .page-overlay {
        display: none !important; 
    }
}

/* --- 4. Page Content Wrapper --- */
.wrap{
    width: 100%;
    margin:0 auto; 
    padding:30px 16px; 
    flex-grow:1; 
}
/* Center the auth card */
.wrap.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding-bottom: 5vh;
}
@media (max-width: 600px) {
    .wrap {
        padding: 20px 10px;
    }
}

/* --- 5. Auth Form Styles (Merged) --- */
.auth-container {
    width: 100%;
    max-width: 450px;
}

/* --- THIS IS THE FIX --- */
.edit-container {
    width: 100%;
    /* max-width: 900px; */ /* <-- REMOVED */
    /* margin: 0 auto; */     /* <-- REMOVED */
}
/* --- END FIX --- */


.auth-card {
    background: var(--panel);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--glow-shadow);
    backdrop-filter: blur(10px);
    background: rgba(13,13,13,0.8);
    width: 100%;
}
.auth-card h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}
.status-success, .status-error {
    padding: 12px;
    border-left: 5px solid;
    margin-bottom: 20px;
    font-weight: 700;
    border-radius: 4px;
    font-size: 0.9rem;
}
.status-success {
    background: rgba(0, 200, 0, 0.15);
    color: #81c784;
    border-color: #4CAF50;
}
.status-error {
    background: rgba(200, 0, 0, 0.2);
    color: var(--gold);
    border-color: var(--gold);
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin: 0 0 5px;
    font-weight: 700;
    color: var(--gold);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: var(--font-mono);
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--ring);
    border-radius: 8px;
    background: #080808;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(255,122,0,0.4);
    background: #000;
}
.btn-auth {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--bg);
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s, box-shadow .2s, transform .2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--glow-shadow);
    margin-top: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-auth:hover {
    background: var(--gold);
    box-shadow: 0 0 24px var(--accent);
    transform: translateY(-2px);
}
.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.9rem;
}
.auth-switch a {
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
}
.auth-switch a:hover {
    text-decoration: underline;
}

/* --- Dashboard Styles --- */
.auth-container.dashboard {
    max-width: 800px;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ring);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.dashboard-header h2 {
    margin: 0;
    text-align: left;
}
.btn-logout {
    display: block;
    font-size: 1.2rem;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}
.btn-logout:hover {
    color: #e04040;
    background-color: rgba(224, 64, 64, 0.1);
}
.auth-card p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}
.cta-buttons {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.btn-auth-secondary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    border: 2px solid var(--accent);
    border-radius: 8px;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s, box-shadow .2s, transform .2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--accent);
    box-shadow: none;
}
.btn-auth-secondary:hover {
    background: var(--accent-bg-faint);
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* --- Edit Form Styles --- */
fieldset.form-group {
    border: 1px solid var(--ring);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background: rgba(0,0,0,0.2);
}
fieldset.form-group legend {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0 10px;
    margin-left: 10px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px 20px;
}
.image-preview {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    background: #080808;
    border: 1px dashed var(--ring);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--ring);
    border-radius: 8px;
    background: #080808;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
}
input[type="file"]::file-selector-button {
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background .2s;
    margin-right: 10px;
}
input[type="file"]::file-selector-button:hover {
    background: var(--gold);
}
.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 5px;
}

/* --- 6. Footer --- */
.portal-footer {
    color:var(--muted);
    text-align:center;
    padding:18px 16px;
    font-size:.85rem;
    font-weight: 300;
    
}


/* --- Responsive Media Queries --- */
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .cta-buttons {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 20px;
    }
}