/* ============================================
   Aydos Koleji Sınav Başvuru Sistemi
   Modern, Temiz ve Profesyonel Tasarım
   ============================================ */

/* CSS Variables */
:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --primary-dark: #1a365d;
    --secondary: #38b2ac;
    --secondary-light: #4fd1c5;
    --accent: #ed8936;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ecc94b;
    --dark: #1a202c;
    --gray-900: #171923;
    --gray-800: #1a202c;
    --gray-700: #2d3748;
    --gray-600: #4a5568;
    --gray-500: #718096;
    --gray-400: #a0aec0;
    --gray-300: #cbd5e0;
    --gray-200: #e2e8f0;
    --gray-100: #edf2f7;
    --gray-50: #f7fafc;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    --gradient-secondary: linear-gradient(135deg, #38b2ac 0%, #4fd1c5 100%);
    --gradient-accent: linear-gradient(135deg, #ed8936 0%, #f6ad55 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-800);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.logo-text h1 {
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 700;
}

.logo-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.header-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-badge span {
    font-weight: 600;
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.card-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.5rem 2rem;
    position: relative;
}

.card-header h2 {
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header p {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.5rem;
}

.card-body {
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-label .required {
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background: #fff5f5;
}

.form-control.is-valid {
    border-color: var(--success);
    background: #f0fff4;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

.form-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 0.375rem;
    display: none;
}

.form-control.is-invalid + .form-error {
    display: block;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(30, 58, 95, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(30, 58, 95, 0.5);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(56, 178, 172, 0.4);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(56, 178, 172, 0.5);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(237, 137, 54, 0.4);
}

.btn-accent:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(237, 137, 54, 0.5);
}

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

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border: 1px solid var(--secondary-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.info-box-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box-content {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

/* Alert */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: #f0fff4;
    border: 1px solid var(--success);
    color: #22543d;
}

.alert-danger {
    background: #fff5f5;
    border: 1px solid var(--danger);
    color: #c53030;
}

.alert-warning {
    background: #fffaf0;
    border: 1px solid var(--warning);
    color: #744210;
}

.alert-info {
    background: #ebf8ff;
    border: 1px solid #4299e1;
    color: #2b6cb0;
}

/* Success Page Styles */
.success-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease;
}

.success-icon svg {
    width: 50px;
    height: 50px;
    color: var(--white);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.success-message {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.info-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.info-card-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.info-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--gray-200);
}

.info-card-row:last-child {
    border-bottom: none;
}

.info-card-label {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.info-card-value {
    font-weight: 600;
    color: var(--gray-800);
}

.info-card-value.highlight {
    color: var(--primary);
    font-size: 1.125rem;
}

/* Ticket Styles */
.ticket-container {
    max-width: 800px;
    margin: 0 auto;
}

.ticket {
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.ticket-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.ticket-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--primary);
}

.ticket-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.ticket-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.ticket-body {
    padding: 2rem;
}

.ticket-section {
    margin-bottom: 1.5rem;
}

.ticket-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-bottom: 0.375rem;
}

.ticket-section-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.ticket-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.ticket-detail {
    text-align: center;
}

.ticket-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.ticket-detail-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.ticket-footer {
    background: var(--gray-100);
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.ticket-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

@media print {
    .ticket-actions,
    .header,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .ticket {
        border-width: 2px;
        box-shadow: none;
    }
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 0.875rem;
}

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

.admin-sidebar {
    width: 280px;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.admin-sidebar-header h2 {
    color: var(--white);
    font-size: 1.25rem;
}

.admin-sidebar-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.admin-nav {
    list-style: none;
}

.admin-nav-item {
    margin-bottom: 0.25rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-nav-link.active {
    border-left: 3px solid var(--secondary);
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.75rem;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(30, 58, 95, 0.1);
    color: var(--primary);
}

.stat-icon.secondary {
    background: rgba(56, 178, 172, 0.1);
    color: var(--secondary);
}

.stat-icon.accent {
    background: rgba(237, 137, 54, 0.1);
    color: var(--accent);
}

.stat-icon.success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-info p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 1.125rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

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

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background: rgba(30, 58, 95, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(56, 178, 172, 0.1);
    color: var(--secondary);
}

.badge-success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(236, 201, 75, 0.1);
    color: #b7791f;
}

.badge-danger {
    background: rgba(245, 101, 101, 0.1);
    color: var(--danger);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

.login-body {
    padding: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 240px;
    }
    
    .admin-main {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-badge {
        display: none;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .ticket-details {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-main {
        margin-left: 0;
    }
}

/* Print Styles */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block;
    }
    
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .card, .ticket {
        box-shadow: none;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
