@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #00a2e8;
    --primary-hover: #008cc9;
    --primary-glow: rgba(0, 162, 232, 0.15);
    
    /* Backgrounds: Ice/Glacier theme */
    --bg-gradient: linear-gradient(135deg, #f0f7fc 0%, #e0f0fc 50%, #d4eaf7 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    
    /* Text colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Borders and inputs */
    --border-color: #e2e8f0;
    --border-focus: #00a2e8;
    --input-bg: #ffffff;
    
    /* Semantic colors */
    --error: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fca5a5;
    
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card {
    background: var(--card-bg);
    border-radius: 16px;
    border-top: 5px solid var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03), 0 0 1px 0 rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Logo and Title */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary);
    animation: float 4s ease-in-out infinite;
}

.auth-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-title .brand-blue {
    color: var(--primary);
}

.auth-title .brand-dark {
    color: #0f172a;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 14px;
    font-family: inherit;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-group:focus-within .form-label {
    color: var(--primary);
}

.form-group:focus-within .input-icon {
    color: var(--primary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 13px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 162, 232, 0.2), 0 2px 4px -1px rgba(0, 162, 232, 0.1);
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 162, 232, 0.3), 0 4px 6px -2px rgba(0, 162, 232, 0.15);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Loading State */
.btn-submit.btn-loading {
    color: transparent;
    pointer-events: none;
}

.btn-submit.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s ease-in-out infinite;
}

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

/* Alerts and Messages */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeInUp 0.4s ease;
}

.alert-danger {
    background-color: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
}

.alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Footer info */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-light);
}

/* Dashboard design (Index page) */
.dashboard-container {
    width: 100%;
    max-width: 900px;
    padding: 24px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

.dashboard-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.btn-logout {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: #cbd5e1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        text-align: center;
    }
    .dashboard-title-wrapper {
        justify-content: center;
    }
    .btn-logout {
        justify-content: center;
    }
}

.dashboard-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

.dashboard-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.meta-table td {
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

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

.meta-table td.label {
    color: var(--text-muted);
    font-weight: 500;
    width: 40%;
}

.meta-table td.value {
    color: var(--text-main);
    font-weight: 600;
}
