/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Container */
.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card Styles */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px 25px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.header h1 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.header p {
    color: var(--gray-color);
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Button Styles */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-success {
    background: var(--success-color);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-warning {
    background: var(--warning-color);
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Navigation */
.navbar {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Dashboard Styles */
.dashboard {
    padding: 80px 20px 20px;
    max-width: 400px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-color);
    text-transform: uppercase;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.action-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Project List */
.project-list {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.project-item {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.project-item:last-child {
    border-bottom: none;
}

.project-item:hover {
    background: #f8f9fa;
}

.project-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray-color);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-planning { background: #e9ecef; color: #495057; }
.status-in_progress { background: #cce7ff; color: #0066cc; }
.status-completed { background: #d4edda; color: #155724; }
.status-on_hold { background: #fff3cd; color: #856404; }

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 12px;
}

.footer a {
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 25px 20px;
    }
    
    .dashboard {
        padding: 70px 15px 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* CAPTCHA Styles */
.captcha-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
}

.captcha-code {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #2c3e50;
    background: linear-gradient(45deg, #fff, #f1f3f4);
    padding: 10px;
    border-radius: 5px;
    display: inline-block;
    min-width: 150px;
    user-select: none;
}

.captcha-refresh {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.captcha-refresh:hover {
    color: #2980b9;
}

/* Password Requirements */
.password-requirements {
    font-size: 12px;
    margin-top: 5px;
}

.requirement {
    display: flex;
    align-items: center;
    margin: 2px 0;
    transition: color 0.3s ease;
}

.requirement.valid {
    color: #28a745;
}

.requirement.invalid {
    color: #dc3545;
}

.requirement-icon {
    margin-right: 5px;
    font-weight: bold;
    width: 15px;
}

/* Form Enhancements */
.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}