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

/* Brand Colors - Updated Palette */

:root {
    --primary-color: #111184;
    --secondary-color: #1f2022;

    --primary-light: #2a2a9e;
    /* Slightly lighter for hover states */
    --accent-color: #1f2022;
    --highlight-color: #eef2ff;
    --brand-orange: #f8f9fa;

    /* Functional Colors */
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2022;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;

    /* Status Colors */
    --success-bg: #dcfce7;
    --success-text: #166534;
    --warning-bg: #ffedd5;
    --warning-text: #9a3412;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --info-bg: #dbeafe;
    --info-text: #1e40af;

    /* Shadows & Radius */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* =========================================
   Login Page Design
   ========================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

/* Abstract Background Shapes */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

.login-page::before {
    width: 600px;
    height: 600px;
    background: rgba(119, 141, 169, 0.15);
    top: -100px;
    left: -100px;
}

.login-page::after {
    width: 500px;
    height: 500px;
    background: rgba(65, 90, 119, 0.2);
    bottom: -100px;
    right: -100px;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 3.5rem 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 440px;
    text-align: center;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--text-muted);
    /* More subtle focus */
    box-shadow: 0 0 0 4px rgba(119, 141, 169, 0.15);
}

input::placeholder {
    color: #a0aab8;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-md);
    /* Slightly more squarish modern look */
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(13, 27, 42, 0.2);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(13, 27, 42, 0.25);
}

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

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.full-width {
    width: 100%;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p,
.login-footer small {
    color: var(--text-muted);
}

/* =========================================
   Admin / Dashboard Layout
   ========================================= */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--primary-color);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    /* Stack logo and text */
    align-items: flex-start;
    /* Align to left */
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    color: white;
    padding: 0 0.5rem;
}

.sidebar-brand img {
    height: 40px;
    /* Slightly larger */
    width: auto;
    filter: brightness(0) invert(1);
    /* Make logo white */
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background: var(--accent-color);
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    flex: 1;
    background: var(--bg-color);
    padding: 2.5rem 3rem;
    overflow-y: auto;
}

/* Header inside Main Content */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem 0.6rem 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-light);
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-light);
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

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

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.925rem;
}

.data-table thead th {
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

.data-table tbody td {
    padding: 1.25rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: #fcfcfc;
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-pending,
.status-başvuru-yok {
    background-color: #f3f4f6;
    color: #4b5563;
}

.status-başvuru-alındı,
.status-submitted {
    background-color: var(--info-bg);
    color: var(--info-text);
}

.status-değerlendiriliyor,
.status-under-review {
    background-color: var(--warning-bg);
    color: var(--warning-text);
}

.status-kabul-edildi,
.status-accepted {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.status-reddedildi,
.status-rejected {
    background-color: var(--error-bg);
    color: var(--error-text);
}

/* Small Buttons */
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    gap: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

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

.alert.success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #a7f3d0;
}

/* Responsive Adjustments */
/* Responsive Adjustments */
@media (max-width: 992px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        flex-direction: column;
        justify-content: flex-start;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar nav {
        flex-direction: column;
        justify-content: flex-start;
        margin-top: 2rem;
    }

    .sidebar .nav-link {
        padding: 0.9rem 1.2rem;
    }

    .sidebar .nav-link span {
        display: inline;
        /* Show text in mobile menu */
    }

    .main-content {
        padding: 1.5rem;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--primary-color);
    }
}

@media (min-width: 993px) {
    .menu-toggle {
        display: none;
    }
}

/* =========================================
   UI Polish - Stepper & Animations
   ========================================= */

/* Stepper */
.stepper-wrapper {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stepper-item::before {
    position: absolute;
    content: "";
    border-bottom: 2px solid #e0e1dd;
    width: 100%;
    top: 20px;
    left: -50%;
    z-index: 2;
}

.stepper-item::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid #e0e1dd;
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 2;
}

.stepper-item .step-counter {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    margin-bottom: 6px;
    border: 2px solid #e0e1dd;
    color: var(--text-muted);
    font-weight: 600;
}

.stepper-item.active {
    font-weight: bold;
}

.stepper-item.completed .step-counter,
.stepper-item.active .step-counter {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.stepper-item.completed::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid var(--primary-color);
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 3;
}

.stepper-item:first-child::before {
    content: none;
}

.stepper-item:last-child::after {
    content: none;
}

.step-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.stepper-item.active .step-name {
    color: var(--primary-color);
    font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.4s ease-out;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-premium);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--primary-color);
    min-width: 300px;
}

.toast.success {
    border-left-color: var(--success-text);
}

.toast.error {
    border-left-color: var(--error-text);
}

.toast.info {
    border-left-color: var(--info-text);
}


@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}