/* =============================================
   BASVURU SISTEMI - ANA STIL
   Tasarim: Minimal, Temiz, Premium
   ============================================= */

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

html { font-size:16px; -webkit-text-size-adjust:100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f0f0;
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   CONTAINER
   ============================================= */
.app-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.app-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 960px;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from { opacity:0; transform:translateY(16px); }
    to { opacity:1; transform:translateY(0); }
}

/* =============================================
   HEADER
   ============================================= */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #f0f0f0;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon svg { display:block; }

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.app-header-right { text-align:right; }

.header-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.header-subtitle {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* =============================================
   BODY LAYOUT
   ============================================= */
.app-body {
    display: flex;
    min-height: 480px;
}

/* =============================================
   SIDEBAR
   ============================================= */
.app-sidebar {
    width: 240px;
    min-width: 240px;
    padding: 32px 24px;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: default;
    transition: all 0.25s ease;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #f5f5f5;
    color: #999;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.step-label {
    font-size: 14px;
    color: #999;
    font-weight: 400;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.step-item.active .step-number {
    background: #1a1a1a;
    color: #fff;
}

.step-item.active .step-label {
    color: #1a1a1a;
    font-weight: 500;
}

.step-item.completed .step-number {
    background: #e8f5e9;
    color: #2e7d32;
}

.step-item.completed .step-label {
    color: #666;
}

/* =============================================
   CONTENT
   ============================================= */
.app-content {
    flex: 1;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.content-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 28px;
}

/* =============================================
   FORMS
   ============================================= */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-row .form-group { margin-bottom:0; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.form-label .required {
    color: #e53935;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26,26,26,0.08);
}

.form-input::placeholder { color:#bbb; }

.form-input.error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229,57,53,0.08);
}

.form-error {
    font-size: 12px;
    color: #e53935;
    margin-top: 6px;
    display: none;
}

.form-error.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity:0; transform:translateY(-4px); }
    to { opacity:1; transform:translateY(0); }
}

/* =============================================
   FILE UPLOAD
   ============================================= */
.upload-area {
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fafafa;
    position: relative;
}

.upload-area:hover {
    border-color: #1a1a1a;
    background: #f5f5f5;
}

.upload-area.drag-over {
    border-color: #1a1a1a;
    background: #f0f0f0;
    transform: scale(1.01);
}

.upload-area.has-file {
    border-color: #2e7d32;
    border-style: solid;
    background: #f1f8e9;
}

.upload-icon { margin-bottom:16px; }

.upload-icon svg {
    width: 48px;
    height: 48px;
    color: #999;
}

.upload-area.has-file .upload-icon svg { color:#2e7d32; }

.upload-text {
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
}

.upload-text strong { color:#1a1a1a; }

.upload-hint {
    font-size: 12px;
    color: #999;
}

.upload-input { display:none; }

.upload-preview {
    margin-top: 16px;
    display: none;
}

.upload-preview.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 0 auto;
    display: block;
}

.preview-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-file-name { font-size:14px; color:#333; font-weight:500; }
.preview-file-size { font-size:12px; color:#999; }

.upload-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #e53935;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-remove:hover {
    background: #fce4ec;
    border-color: #e53935;
}

.camera-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 20px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.camera-btn:hover { background:#333; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    line-height: 1.4;
}

.btn-next {
    background: #1a1a1a;
    color: #fff;
}

.btn-next:hover {
    background: #333;
    transform: translateY(-1px);
}

.btn-next:active { transform:translateY(0); }

.btn-back {
    background: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
}

.btn-back:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =============================================
   NAVIGATION
   ============================================= */
.app-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 32px;
}

/* =============================================
   WELCOME
   ============================================= */
.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 40px 0;
}

.welcome-icon { margin-bottom:24px; }
.welcome-icon svg { width:80px; height:80px; color:#1a1a1a; }

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.welcome-desc {
    font-size: 15px;
    color: #888;
    max-width: 400px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.welcome-features {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
}

.welcome-feature svg { width:18px; height:18px; color:#2e7d32; }

.btn-start { padding:14px 40px; font-size:16px; font-weight:600; }

/* =============================================
   SUCCESS
   ============================================= */
.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 40px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn { from{transform:scale(0)} to{transform:scale(1)} }

.success-icon svg { width:40px; height:40px; color:#2e7d32; }

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.success-desc {
    font-size: 14px;
    color: #888;
    margin-bottom: 32px;
}

.application-no-card {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 40px;
    margin-bottom: 24px;
}

.application-no-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.application-no-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.success-note {
    font-size: 13px;
    color: #999;
    max-width: 380px;
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.alert-error { background:#fce4ec; color:#c62828; border:1px solid #ef9a9a; }
.alert-success { background:#e8f5e9; color:#2e7d32; border:1px solid #a5d6a7; }
.alert-info { background:#e3f2fd; color:#1565c0; border:1px solid #90caf9; }

/* =============================================
   LOADING
   ============================================= */
.loading-overlay {
    display: none;
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active { display:flex; }

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =============================================
   RESPONSIVE - TABLET
   ============================================= */
@media screen and (max-width: 768px) {
    .app-container { padding:0; align-items:flex-start; }

    .app-card {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .app-header { padding:16px 20px; }
    .app-header-right { display:none; }
    .logo-text { font-size:18px; }

    .app-body {
        flex-direction: column;
        min-height: calc(100vh - 73px);
    }

    .app-sidebar {
        width: 100%;
        min-width: 100%;
        flex-direction: row;
        padding: 14px 16px;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        gap: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .app-sidebar::-webkit-scrollbar { display:none; }

    .step-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px 10px;
        min-width: auto;
        flex-shrink: 0;
    }

    .step-number { width:30px; height:30px; font-size:13px; border-radius:8px; }
    .step-label { font-size:10px; }

    .app-content { padding:24px 20px; flex:1; }
    .content-title { font-size:20px; }

    .form-row { flex-direction:column; gap:0; }
    .form-input { padding:14px 16px; font-size:16px; }

    .upload-area { padding:28px 16px; }

    .welcome-title { font-size:22px; }
    .welcome-features { flex-direction:column; gap:12px; }

    .application-no-value { font-size:22px; }
    .application-no-card { padding:20px 24px; }
}

/* =============================================
   RESPONSIVE - SMALL PHONES
   ============================================= */
@media screen and (max-width: 380px) {
    .app-header { padding:12px 14px; }
    .logo-text { font-size:16px; }

    .app-sidebar { padding:10px 12px; }
    .step-label { font-size:9px; }
    .step-number { width:26px; height:26px; font-size:11px; }

    .app-content { padding:18px 14px; }
    .content-title { font-size:18px; }
    .form-input { padding:12px 14px; }
    .upload-area { padding:20px 10px; }

    .welcome-title { font-size:20px; }
    .application-no-value { font-size:18px; letter-spacing:1px; }

    .btn { padding:12px 20px; font-size:14px; }
}

/* =============================================
   FOCUS
   ============================================= */
.btn:focus-visible,
.form-input:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}
