/**
 * Enerji Hastanesi – Guest/Tracking/Auth (tüm views için merkezi CSS)
 * İçerik: tracking/result, tracking/index, auth/login
 */

/* ========== Tracking Result ========== */
body.result-page,
body.tracking-page {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
}

body.result-page {
    background: var(--bg-gradient);
    padding: 2rem 1rem;
}

.result-container {
    max-width: 600px;
    margin: 0 auto;
}

.result-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.result-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    padding: 2rem;
    color: white;
    text-align: center;
}

.repair-code {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.current-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
}

.result-body {
    padding: 0;
}

body.result-page .section-title,
body.tracking-page .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    padding: 1.25rem 1.5rem;
    margin: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

body.result-page .section-title i,
body.tracking-page .section-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

body.result-page .timeline {
    padding: 1.5rem;
    position: relative;
}

body.result-page .timeline-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.result-page .timeline-item:last-child {
    padding-bottom: 0;
}

.result-page .timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: white;
    position: relative;
    z-index: 1;
}

.timeline-content {
    flex: 1;
    padding-top: 0.25rem;
}

.timeline-status {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

body.result-page .timeline-item:first-child .timeline-icon {
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
}

.shipment-info {
    padding: 1.5rem;
}

.shipment-card {
    background: #f8f9fa;
    border-radius: 1rem;
    padding: 1.25rem;
}

.shipment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.shipment-row:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.shipment-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.shipment-value {
    font-weight: 600;
    color: #333;
}

.tracking-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.tracking-link:hover {
    text-decoration: underline;
}

.media-gallery {
    padding: 1.5rem;
}

.media-item {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.media-item img {
    width: 100%;
    height: auto;
    display: block;
}

.media-caption {
    background: #f8f9fa;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

body.result-page .empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

body.result-page .empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

body.result-page .bg-warning { background-color: #ffc107 !important; }
body.result-page .bg-info { background-color: #0dcaf0 !important; }
body.result-page .bg-primary { background-color: #0d6efd !important; }
body.result-page .bg-success { background-color: #198754 !important; }
body.result-page .bg-danger { background-color: #dc3545 !important; }
body.result-page .bg-secondary { background-color: #6c757d !important; }

/* ========== Tracking Index ========== */
body.tracking-page {
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.tracking-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
}

.tracking-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
}

.tracking-header .logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tracking-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tracking-header p {
    opacity: 0.9;
    font-size: 0.95rem;
    margin: 0;
}

.tracking-body {
    padding: 2.5rem 2rem;
}

body.tracking-page .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.75rem;
}

body.tracking-page .form-control {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    transition: all 0.3s ease;
}

body.tracking-page .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}

body.tracking-page .form-control.is-invalid {
    border-color: #dc3545;
}

.btn-track {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    border: none;
    color: white;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.btn-track:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.3);
}

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

.help-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.help-text i {
    margin-right: 0.5rem;
}

body.tracking-page .invalid-feedback {
    font-size: 0.9rem;
    margin-top: 0.75rem;
    text-align: center;
}

.tracking-footer {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.tracking-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.tracking-footer a:hover {
    text-decoration: underline;
}

@keyframes app-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: app-shake 0.4s ease-in-out;
}

/* ========== Login ========== */
body.login-page {
    --eh-primary: #0d6efd;
    --eh-primary-dark: #0a58ca;
    --eh-warning: #ffc107;
    --eh-bg: #0f172a;
    --eh-card-bg: #1e293b;
    --eh-text: #e2e8f0;
    --eh-text-muted: #94a3b8;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--eh-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--eh-card-bg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--eh-primary) 0%, var(--eh-primary-dark) 100%);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--eh-card-bg);
    border-radius: 50%;
}

.login-logo {
    font-size: 3rem;
    color: var(--eh-warning);
    margin-bottom: 0.5rem;
}

.login-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.login-body {
    padding: 2.5rem 2rem 2rem;
}

body.login-page .form-label {
    color: var(--eh-text);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

body.login-page .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--eh-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

body.login-page .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--eh-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    color: var(--eh-text);
}

body.login-page .form-control::placeholder {
    color: var(--eh-text-muted);
}

body.login-page .input-group-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    color: var(--eh-text-muted);
}

body.login-page .input-group .form-control {
    border-left: none;
}

body.login-page .input-group:focus-within .input-group-text {
    border-color: var(--eh-primary);
}

body.login-page .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.login-page .form-check-input:checked {
    background-color: var(--eh-primary);
    border-color: var(--eh-primary);
}

body.login-page .form-check-label {
    color: var(--eh-text-muted);
    font-size: 0.875rem;
}

.btn-login {
    background: linear-gradient(135deg, var(--eh-primary) 0%, var(--eh-primary-dark) 100%);
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    width: 100%;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(13, 110, 253, 0.5);
}

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

body.login-page .alert {
    border-radius: 8px;
    font-size: 0.875rem;
}

body.login-page .alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #f87171;
}

.login-footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
    color: var(--eh-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    color: var(--eh-text-muted);
    font-size: 0.75rem;
    margin-top: 1.5rem;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--eh-text-muted);
    cursor: pointer;
    padding: 0;
}

.password-toggle:hover {
    color: var(--eh-text);
}

body.login-page .position-relative {
    position: relative;
}
