/**
 * Monochrome Theme - Consolidated CSS
 * Complete design system for login and dashboard
 * Import this single file for consistent monochrome styling
 */

/* ========================================
   IMPORT CORE STYLES
   ======================================== */

@import url('core/variables.css');
@import url('core/base.css');

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-body {
    font-family: var(--font-family-base);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--mono-gray-950) 0%, var(--mono-gray-900) 50%, var(--mono-gray-800) 100%);
    margin: 0;
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--glass-border);
    padding: var(--space-10);
    box-shadow: var(--shadow-2xl),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.6s ease-out;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--gradient-light);
    animation: shimmerTop 3s ease-in-out infinite;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-5);
}

.login-logo {
    width: 72px;
    height: 72px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-3xl);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    z-index: 1;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.6;
    animation: glow 2s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes glow {
    from {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.login-title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
    letter-spacing: var(--letter-spacing-tight);
}

.login-subtitle {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
    font-weight: var(--font-weight-medium);
}

/* Login Alerts */
.login-alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    backdrop-filter: var(--backdrop-blur);
    animation: alertSlideIn 0.4s ease-out;
}

.login-alert i {
    font-size: var(--font-size-lg);
}

.login-alert-success {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--mono-gray-600);
    color: var(--text-primary);
}

.login-alert-error {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--mono-gray-500);
    color: var(--text-primary);
}

/* Login Form */
.login-form {
    /* Container */
}

/* Form Label */
.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-label i {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

/* Password Wrapper */
.password-wrapper .form-input {
    padding-right: var(--space-12);
}

.password-toggle {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
}

/* Input Highlight Effect */
.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--gradient-light);
    transition: width var(--transition-base);
    border-radius: 2px;
}

.form-input:focus ~ .input-highlight {
    width: 100%;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-7);
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--text-primary);
    font-size: var(--font-size-xs);
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-base);
}

.checkbox-input:checked ~ .checkbox-custom {
    background: var(--gradient-secondary);
    border-color: transparent;
}

.checkbox-input:checked ~ .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-input:focus ~ .checkbox-custom {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.checkbox-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

/* Forgot Link */
.forgot-link {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--text-primary);
}

.forgot-link:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--text-inverse);
    background: var(--gradient-light);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    font-family: inherit;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.submit-button:hover::before {
    opacity: 1;
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:focus-visible {
    outline: 3px solid var(--focus-ring-color);
    outline-offset: 2px;
}

/* Button States */
.button-text {
    position: relative;
    z-index: 1;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 2;
}

.submit-button.loading .button-text {
    opacity: 0;
}

.submit-button.loading .button-loader {
    opacity: 1;
}

.submit-button:disabled,
.submit-button.loading {
    cursor: not-allowed;
    opacity: 0.7;
}

.submit-button:disabled:hover,
.submit-button.loading:hover {
    transform: none;
}

/* Button Shine */
.button-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s;
}

.submit-button:hover .button-shine {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Login Footer */
.login-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
}

.footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
}

.footer-text i {
    color: var(--text-secondary);
}

/* Decoration Lines */
.decoration-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    z-index: 0;
}

.line-1 {
    width: 300px;
    top: 50px;
    right: -150px;
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.line-2 {
    width: 250px;
    bottom: 80px;
    left: -125px;
    transform: rotate(-45deg);
    animation: shimmer 3s infinite 1.5s;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* ========================================
   DASHBOARD LAYOUT STYLES
   ======================================== */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-page);
    position: relative;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-6);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-xl);
}

.sidebar-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.sidebar-logo i {
    font-size: var(--font-size-2xl);
}

.sidebar-logo:hover {
    color: var(--text-secondary);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: var(--space-2);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-weight: var(--font-weight-medium);
    min-height: 48px;
    position: relative;
}

.sidebar-nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-nav-link:focus-visible {
    outline: 3px solid var(--focus-ring-color);
    outline-offset: -3px;
}

.sidebar-nav-link.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-left: 4px solid var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

.sidebar-nav-icon {
    margin-right: var(--space-4);
    width: 20px;
    text-align: center;
    font-size: var(--font-size-lg);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-page);
}

/* Top Header */
.top-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-5) var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
}

.top-header-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin: 0;
    color: var(--text-primary);
}

.top-header-user {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.top-header-username {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

/* Dashboard Content */
.dashboard-content {
    padding: var(--space-8);
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.dashboard-page {
    /* Container */
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 2px solid var(--border-color-strong);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-color-hover);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.stat-card-icon {
    font-size: var(--font-size-3xl);
    color: var(--text-secondary);
}

.stat-card-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    margin: 0;
}

.stat-card-value {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.stat-card-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* Card Component */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card-hover);
}

.card-header h2 {
    margin: 0;
    font-size: var(--font-size-xl);
}

.card-body {
    padding: var(--space-6);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--bg-card-hover);
    border-bottom: 2px solid var(--border-color);
}

.table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.table td {
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.status-pending {
    border-color: var(--mono-gray-600);
}

.status-approved {
    border-color: var(--mono-gray-500);
}

.status-rejected {
    border-color: var(--mono-gray-400);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content {
        padding: var(--space-4);
    }
    
    .top-header {
        padding: var(--space-4);
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }
    
    .login-card {
        padding: var(--space-8) var(--space-6);
    }
}

@media (max-width: 480px) {
    .login-body {
        padding: var(--space-4);
    }
    
    .login-title {
        font-size: var(--font-size-2xl);
    }
    
    .login-logo {
        width: 64px;
        height: 64px;
        font-size: var(--font-size-2xl);
    }
    
    .form-input {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
