/* Admin Styles - Uses shared.css variables */
@import url('/shared.css');

body {
    background: var(--bg-light);
    color: var(--text-color);
}

/* Login Screen */
#login-screen.active {
    min-height: 100vh;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
}

#dashboard-screen.active {
    display: flex !important;
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-large);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.login-container button {
    width: 100%;
}

/* Dashboard Layout */
#dashboard-screen {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    flex-shrink: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.user-info {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0.5rem;
    width: 100%;
}

.nav-menu {
    list-style: none;
}

.nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-header > div {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* List Items */
.list {
    display: grid;
    gap: 1rem;
}

.list-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-item-content {
    flex: 1;
    min-width: 200px;
}

.list-item-content h3 {
    margin-bottom: 0.5rem;
}

.list-item-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    word-wrap: break-word;
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-view {
    background: var(--success-color);
    color: white;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.session-code {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.badge-waiting { background: var(--warning-color); color: white; }
.badge-active { background: var(--success-color); color: white; }
.badge-completed { background: var(--gray-color); color: white; }

/* Mobile Responsive */
@media (max-width: 768px) {
    #dashboard-screen {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem 0;
    }
    
    .content {
        padding: 1rem;
    }
    
    .view-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-header > div {
        width: 100%;
    }
    
    .list-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .list-item-actions {
        width: 100%;
    }
    
    .list-item-actions button {
        flex: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
