/* ==========================================================================
   ALP-Admin Dashboard Styles
   Theme: AlpineAI (Dark, Premium, Red Accents)
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --bg-panel: rgba(25, 25, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    
    --brand-red: #E63946;
    --brand-red-hover: #D62828;
    --brand-red-glow: rgba(230, 57, 70, 0.3);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--brand-red-glow);
    --radius-md: 12px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Screen Management
   ========================================================================== */
.screen {
    min-height: 100vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

/* ==========================================================================
   Login Screen
   ========================================================================== */
body {
    font-family: var(--font-main);
    background-color: #000000;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background: #1B1B1D;
    border-radius: 24px;
    z-index: 10;
    transform: translateY(20px);
    animation: slideUp 0.6s var(--transition-smooth) forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.login-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.login-avatar {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.robot-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: lighten;
}

.login-titles {
    flex: 1;
}

.login-titles h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #fff;
}

.login-titles p {
    font-size: 0.85rem;
    color: #8E8E93;
    line-height: 1.4;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: none;
}

.input-group input {
    width: 100%;
    padding: 1.1rem 1.25rem;
    background: #2A2A2C;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: #323234;
}

.input-group input::placeholder {
    color: #8E8E93;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    margin-top: 1rem;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    position: relative;
}

.btn-primary:hover {
    background: #e0e0e0;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Loader in Button */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Dashboard Screen
   ========================================================================== */
#dashboard-screen {
    display: flex;
    flex-direction: column;
    background: #111111;
    height: 100vh;
    overflow: hidden;
}

.dashboard-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #19191B;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #2C2C2E;
    background: #1C1C1E;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

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

/* Table Styles */
.table-container {
    flex: 1;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    border: none;
    position: relative;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
}

th {
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.status-new {
    background: rgba(230, 57, 70, 0.2);
    color: #ff6b77;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

/* Loader & Empty State */
.table-loader, .empty-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel);
    z-index: 5;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--brand-red);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

.empty-state svg {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--brand-red);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 1rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    th, td {
        white-space: nowrap;
    }
}
