/* ISG Unified Portal - Ana Stil Dosyasi */
/* Slate renk semasi - Kurumsal tasarim */

:root {
    --primary: #1e293b;
    --primary-dark: #0f172a;
    --primary-light: rgba(30, 41, 59, 0.1);
    --accent: #3b82f6;
    --accent-rgb: 59, 130, 246;
    --accent-light: rgba(59, 130, 246, 0.1);
    --success: #1de9b6;
    --success-dark: #17d4a5;
    --danger: #f44236;
    --danger-dark: #e53935;
    --warning: #f4c22b;
    --warning-dark: #e5b526;
    --dark: #1d2630;
    --dark-secondary: #39465f;
    --text-primary: #1d2630;
    --text-secondary: #5b6b79;
    --text-muted: #8996a4;
    --border-color: #dbe0e5;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(27, 46, 94, 0.08);
    --shadow-md: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(27, 46, 94, 0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 16px 48px rgba(27, 46, 94, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Public Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
}

/* Mazgal/Grid Arka Plan Deseni */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(30, 41, 59, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

body > * {
    position: relative;
    z-index: 1;
}

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

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: row;
    border: 1px solid rgba(0,0,0,0.04);
}

.login-brand {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    flex: 1;
    min-width: 320px;
    position: relative;
    overflow: hidden;
}

/* Login brand arka plan deseni */
.login-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.login-brand > * {
    position: relative;
    z-index: 1;
}

.login-brand .logo {
    width: 100px;
    height: 100px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.login-brand .logo img {
    width: 70px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.login-brand .logo i {
    font-size: 48px;
    color: #93c5fd;
}

.login-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-brand .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 24px;
    color: #94a3b8;
}

.login-brand .description {
    font-size: 0.875rem;
    opacity: 0.8;
    max-width: 280px;
    line-height: 1.6;
    color: #94a3b8;
}

.login-form-section {
    padding: 60px 50px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-form-section .form-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group .input-wrapper {
    position: relative;
}

.form-group .input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
    background: #f8fafc;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-white);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.error-message {
    background: rgba(244, 66, 54, 0.1);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

/* =====================================================
   PORTAL SELECT PAGE
   ===================================================== */

.portal-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.portal-header {
    text-align: center;
    margin-bottom: 40px;
}

.portal-header .user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.25);
}

.portal-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.portal-header .user-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.portal-header .welcome-text {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 24px;
}

.portal-cards {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 800px;
}

.portal-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    text-align: center;
    min-width: 280px;
    max-width: 350px;
    flex: 1;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.portal-card .card-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.portal-card.education .card-icon {
    background: var(--accent-light);
    color: var(--accent);
}

.portal-card.management .card-icon {
    background: rgba(29, 233, 182, 0.1);
    color: var(--success);
}

.portal-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.portal-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.portal-card .arrow {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: var(--transition);
}

.portal-card:hover .arrow {
    color: var(--accent);
    transform: translateX(4px);
}

.logout-link {
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.logout-link:hover {
    color: var(--danger);
}

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

@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        max-width: 400px;
    }

    .login-brand {
        min-width: unset;
        padding: 40px 30px;
    }

    .login-brand h1 {
        font-size: 1.25rem;
    }

    .login-brand .description {
        display: none;
    }

    .login-form-section {
        padding: 40px 30px;
    }

    .portal-cards {
        flex-direction: column;
        align-items: center;
    }

    .portal-card {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-brand {
        padding: 30px 20px;
    }

    .login-brand .logo {
        width: 80px;
        height: 80px;
    }

    .login-brand .logo i {
        font-size: 36px;
    }

    .login-form-section {
        padding: 30px 20px;
    }

    .form-group input {
        padding: 12px 12px 12px 44px;
    }
}

/* =====================================================
   UTILITIES
   ===================================================== */

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

.hidden { display: none; }
