/* ============================================================================
   GradSuite Web - Modern Responsive Styles
   ============================================================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   Flash Messages
   ============================================================================ */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    background: var(--bg-white);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success { border-left: 4px solid var(--success); }
.alert-error { border-left: 4px solid var(--error); }
.alert-info { border-left: 4px solid var(--info); }
.alert-warning { border-left: 4px solid var(--warning); }

.alert-icon {
    font-size: 20px;
    margin-right: 12px;
    font-weight: bold;
}

.alert-success .alert-icon { color: var(--success); }
.alert-error .alert-icon { color: var(--error); }
.alert-info .alert-icon { color: var(--info); }
.alert-warning .alert-icon { color: var(--warning); }

.alert-message {
    flex: 1;
    font-size: 14px;
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    margin-left: 12px;
    padding: 0 5px;
    line-height: 1;
}

.alert-close:hover {
    color: var(--text-dark);
}

/* ============================================================================
   Authentication Pages
   ============================================================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 16px;
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 13px;
}

.password-requirements {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 12px;
    margin-top: 10px;
}

.req-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
}

.password-requirements ul {
    list-style: none;
    font-size: 13px;
}

.password-requirements li {
    padding: 4px 0 4px 20px;
    position: relative;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
}

.password-requirements li.valid {
    color: var(--success);
}

.password-requirements li.valid::before {
    content: '✓';
    font-weight: bold;
}

.password-requirements li.invalid {
    color: var(--text-light);
}

.password-match {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
}

.password-match.valid {
    color: var(--success);
}

.password-match.invalid {
    color: var(--error);
}

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-light);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    font-size: 18px;
    margin-right: 6px;
}

/* ============================================================================
   Dashboard
   ============================================================================ */
.dashboard-container {
    min-height: 100vh;
    background: var(--bg-light);
}

.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 16px 0;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand h1 {
    font-size: 24px;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-user {
    color: var(--text-light);
    font-size: 14px;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.content-header h2 {
    font-size: 28px;
    color: var(--text-dark);
}

/* ============================================================================
   Projects Grid
   ============================================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    margin-bottom: 16px;
}

.project-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.project-event {
    font-size: 14px;
    color: var(--text-light);
}

.project-stats {
    display: flex;
    gap: 16px;
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.link-btn {
    padding: 10px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.link-register {
    background: #3b82f6;
    color: white;
}

.link-register:hover {
    background: #2563eb;
}

.link-admin {
    background: #ef4444;
    color: white;
}

.link-admin:hover {
    background: #dc2626;
}

.link-download {
    background: #f59e0b;
    color: white;
}

.link-download:hover {
    background: #d97706;
}

.project-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.project-footer small {
    color: var(--text-light);
    font-size: 12px;
}

/* ============================================================================
   Empty State
   ============================================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ============================================================================
   Create Project
   ============================================================================ */
.create-project-container {
    max-width: 600px;
    margin: 0 auto;
}

.create-project-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px;
}

.create-project-card h2 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

.project-form {
    margin-top: 30px;
}

.project-structure-info {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 20px;
    margin: 24px 0;
}

.project-structure-info h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.project-structure-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.project-structure-info ul {
    list-style: none;
    font-size: 14px;
}

.project-structure-info li {
    padding: 6px 0;
    color: var(--text-dark);
}

.project-structure-info strong {
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.form-actions .btn {
    flex: 1;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .content-header .btn {
        width: 100%;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu .btn {
        width: 100%;
    }
    
    .flash-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}
