/* ==================== GLOBAL STYLES & VARIABLES ==================== */

:root {
  /* Colors (Design System) */
  --primary: #0066FF;
  --primary-rgb: 0, 102, 255;
  --primary-hover: #0052CC;
  --primary-light: #EFF6FF;
  --success: #22C55E;
  --warning: #EAB308;
  --danger: #EF4444;
  --info: #3B82F6;
  --error: #EF4444;

  /* Grays (Design System neutrals) */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'CabinetGrotesk', sans-serif;
}

body {
    font-family: 'CabinetGrotesk', sans-serif;
    background: var(--gray-900);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
    position: relative;
}

.logo {
    margin-bottom: 40px;
}

.logo-icon {
    width: 100px;
    height: 100px;
}

.login-card {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

.login-card h1 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: #ffffff;
}

.subtitle {
    text-align: center;
    color: var(--gray-400);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #ffffff;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: var(--gray-500);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.login-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: var(--gray-500);
    cursor: not-allowed;
    transform: none;
}

.forgot-password {
    text-align: center;
    margin-top: 16px;
}

.forgot-password a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.forgot-password a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.signup-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray-400);
}

.signup-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.signup-link a:hover {
    text-decoration: underline;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}

.loading-message {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: var(--primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}

.back-to-login {
    text-align: center;
    margin-top: 24px;
}

.back-to-login a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.back-to-login a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #666666;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .projects-table {
        font-size: 14px;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions button {
        width: 100%;
        margin-right: 0;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-message {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Dashboard styles */
.dashboard-container {
    min-height: 100vh;
    background: var(--gray-900);
    color: #ffffff;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dashboard-main {
    padding: 40px;
    display: flex;
    justify-content: center;
}

.welcome-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.welcome-card h1 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--primary);
}

.welcome-card p {
    font-size: 18px;
    color: #a0a0a0;
    margin-bottom: 32px;
}

.user-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    text-align: left;
}

.user-info p {
    margin: 8px 0;
    font-size: 14px;
}

.verification-alert {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    text-align: center;
}

.verification-alert p {
    color: #ffc107;
    margin-bottom: 12px;
    font-size: 14px;
}

.verification-btn {
    background: #ffc107;
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.verification-btn:hover {
    background: #ffcd39;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    max-width: 800px;
    width: 100%;
}

.action-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.action-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.action-card h3 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 8px;
}

.action-card p {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 16px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--primary);
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding: 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 300px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-icon-sidebar {
    width: 300px;
    padding: 20px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #333;
}

.nav-item.active {
    background: #fff3cd;
    color: #333;
    border-right: 3px solid var(--primary);
}

.nav-icon {
    font-size: 16px;
}

.nav-text {
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 0;
}

.main-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.logout-btn:hover {
    background: #c82333;
}

/* Admin Panel */
.admin-panel {
    padding: 30px;
    background: #f5f5f5;
    min-height: calc(100vh - 80px);
}

.admin-panel h3 {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.admin-btn {
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-1px);
}
