/* DRMA Student Onboarding — Admin Portal */

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

:root {
    --bg: #0f1115;
    --surface: #16181f;
    --surface-2: #1e2028;
    --border: #2a2c35;
    --text: #f4f1ec;
    --text-dim: #9a9aaa;
    --gold: #e6b65c;
    --gold-dark: #c49530;
    --gold-glow: #e6b65c30;
    --teal: #24a8a2;
    --orange: #ee612e;
    --red: #e74c3c;
    --green: #2ecc71;
    --radius: 10px;
}

body {
    font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    height: 100vh;
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: 56px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 20px;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-title {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 500;
}

/* Layout */
main {
    display: flex;
    height: 100vh;
    padding-top: 56px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

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

.sidebar-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.student-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.student-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.student-item:hover {
    background: var(--surface-2);
}

.student-item.active {
    background: var(--gold-glow);
    border: 1px solid var(--gold);
}

.student-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    flex-shrink: 0;
    overflow: hidden;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-item-info {
    flex: 1;
    min-width: 0;
}

.student-item-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-item-sub {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-item-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.student-item-status.draft { background: var(--orange); }
.student-item-status.deployed { background: var(--green); }

/* Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-dim);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h2 {
    color: var(--text);
    font-size: 24px;
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 24px;
    font-size: 15px;
}

/* Form */
.student-form { max-width: 800px; }

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-header h2 {
    font-size: 22px;
}

.form-actions {
    display: flex;
    gap: 8px;
}

/* Steps */
.form-steps {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--surface);
    padding: 4px;
    border-radius: 10px;
}

.step {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.step:hover { color: var(--text); }
.step.active {
    background: var(--gold);
    color: var(--bg);
    font-weight: 600;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* Form sections */
.form-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.form-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--gold);
}

.form-hint {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--gold);
}

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

.input-suffix {
    display: flex;
    align-items: center;
}

.input-suffix input {
    border-radius: 8px 0 0 8px;
    border-right: none;
    flex: 1;
}

.input-suffix span {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Photo upload */
.photo-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}

.photo-upload {
    cursor: pointer;
}

.photo-placeholder {
    width: 140px;
    height: 140px;
    background: var(--surface-2);
    border: 2px dashed var(--border);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: border-color 0.2s;
    overflow: hidden;
}

.photo-placeholder.wide {
    width: 100%;
    height: 180px;
    border-radius: var(--radius);
}

.photo-placeholder:hover {
    border-color: var(--gold);
}

.photo-placeholder span {
    font-size: 28px;
}

.photo-placeholder p {
    font-size: 12px;
    color: var(--text-dim);
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Release cards */
.releases-list,
.videos-list,
.shows-list {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.release-item,
.video-item,
.show-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.release-fields,
.video-fields,
.show-fields {
    display: grid;
    gap: 8px;
}

.release-fields input,
.video-fields input,
.show-fields input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.release-fields input:focus,
.video-fields input:focus,
.show-fields input:focus {
    border-color: var(--gold);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}

.remove-btn:hover {
    color: var(--red);
}

/* Template selection */
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.template-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s;
}

.template-card:hover {
    border-color: var(--text-dim);
}

.template-card.selected {
    border-color: var(--gold);
}

.template-card p {
    font-size: 13px;
    margin-top: 8px;
    color: var(--text-dim);
}

.template-preview {
    height: 100px;
    border-radius: 6px;
}

.dark-preview {
    background: linear-gradient(180deg, #1a1c24 0%, #0f1115 100%);
}

.light-preview {
    background: linear-gradient(180deg, #f4f1ec 0%, #e8e4dc 100%);
}

.gradient-preview {
    background: linear-gradient(135deg, #0f1115 0%, #1a2332 50%, #0f1115 100%);
}

/* Color swatches */
.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.selected {
    border-color: var(--text);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* Deploy */
.deploy-info {
    display: grid;
    gap: 16px;
}

.deploy-url {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.url-label {
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
}

.url-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--gold);
}

.deploy-actions {
    display: flex;
    gap: 12px;
}

.deploy-output pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-size: 12px;
    color: var(--text-dim);
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--gold-glow);
}

.btn-outline {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-large {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    font-family: inherit;
}

.btn-icon:hover { opacity: 0.9; }

.btn-danger {
    background: var(--red);
    color: white;
}

/* Preview modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.modal.hidden { display: none; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.modal-header span {
    font-size: 14px;
    font-weight: 600;
}

.preview-frame {
    flex: 1;
    border: none;
    width: 100%;
}

/* Utility */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    main { flex-direction: column; }

    .sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .deploy-actions {
        flex-direction: column;
    }
}
