/* Base - match SKY Orange Theme */
* { box-sizing: border-box; }
body { font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 12px; margin: 0; padding: 0; background: url('/image/bg-sky.jpg') no-repeat center center fixed; background-size: cover; color: #333; }
a { color: #0000FF; text-decoration: none; }
a:hover { color: #FF0000; text-decoration: underline; }

.container { max-width: 1000px; margin: 0 auto; background: #fff; min-height: 100vh; box-shadow: 0 0 10px rgba(0,0,0,0.1); }

/* Top bar - SKY maroon */
.topbar { background: #660000; color: #fff; padding: 0; display: flex; justify-content: space-between; align-items: center; }
.topbar-title { font-size: 14pt; font-weight: bold; padding: 12px 15px; }
.topbar-user { font-size: 10px; padding-right: 15px; }
.topbar a { color: #FF9966; }
.topbar a:hover { color: #fff; }
.topbar-banner { display: block; width: 100%; height: auto; }

/* Navigation - SKY style */
.nav { background: #fcebdf; padding: 8px 15px; border-bottom: 2px solid #660000; }
.nav a { color: #660000; margin-right: 15px; font-weight: bold; padding: 4px 10px; border-radius: 3px; }
.nav a:hover { background: #660000; color: #fff; text-decoration: none; }
.nav a.active { background: #660000; color: #fff; }

/* Content */
.content { padding: 15px; }
.content h2 { font-size: 13pt; color: #660033; margin: 0 0 15px 0; border-bottom: 2px solid #C2CFD8; padding-bottom: 5px; }

/* Ticket list table */
table.ticket-list { width: 100%; border-collapse: collapse; }
table.ticket-list th { background: #660000; color: #fff; padding: 7px 8px; text-align: left; font-size: 11px; }
table.ticket-list td { padding: 7px 8px; border-bottom: 1px solid #ddd; font-size: 11px; }
table.ticket-list td:first-child { max-width: 90px; white-space: nowrap; }
table.ticket-list tr:hover { background: #fcebdf; }
table.ticket-list tr.row-alt { background: #f9f9f9; }

/* Forms */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 3px; color: #660033; }
.form-group input[type="text"],
.form-group select,
.form-group textarea {
    font: 400 12px Verdana, sans-serif; color: #000; background: #fff; border: 1px solid #ccc; padding: 5px; width: 100%;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input[type="file"] { font: 400 11px Verdana, sans-serif; }
.form-hint { font-size: 10px; color: #888; margin-top: 2px; }

/* Buttons */
.btn { font: 400 12px Verdana, sans-serif; padding: 6px 18px; cursor: pointer; border: 1px solid #999; border-radius: 3px; }
.btn-primary { background: #660000; color: #fff; border-color: #660000; }
.btn-primary:hover { background: #4d0000; }
.btn-success { background: #28a745; color: #fff; border-color: #28a745; }
.btn-success:hover { background: #1e7e34; }
.btn-sm { padding: 3px 10px; font-size: 11px; }

/* Status badges */
.badge { padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: bold; color: #fff; display: inline-block; }
.badge-baru { background: #007bff; }
.badge-proses { background: #ffc107; color: #333; }
.badge-selesai { background: #28a745; }
.badge-ditutup { background: #6c757d; }

/* Priority */
.priority-tinggi { color: #dc3545; font-weight: bold; }
.priority-sederhana { color: #e68a00; font-weight: bold; }
.priority-rendah { color: #28a745; }

/* Ticket detail */
.ticket-detail { border: 1px solid #C2CFD8; margin-bottom: 15px; }
.ticket-detail-header { background: #660000; color: #fff; padding: 10px 12px; font-weight: bold; }
.ticket-detail-body { padding: 12px; line-height: 1.6; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 10px; font-size: 11px; color: #555; }
.ticket-meta span { background: #f5f5f5; padding: 3px 8px; border-radius: 3px; }

/* Reply thread */
.reply { border: 1px solid #C2CFD8; margin-bottom: 10px; border-radius: 3px; }
.reply-header { background: #fcebdf; padding: 7px 10px; font-size: 11px; color: #555; border-bottom: 1px solid #C2CFD8; }
.reply-header.admin { background: #660000; color: #fff; }
.reply-body { padding: 10px; line-height: 1.5; }

/* Audit trail */
.audit-item { padding: 5px 10px; font-size: 10px; color: #666; border-left: 3px solid #C2CFD8; margin-bottom: 5px; background: #fafafa; }
.audit-item .audit-time { color: #999; }

/* Filter bar */
.filter-bar { background: #f5f5f5; padding: 10px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 3px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar select, .filter-bar input[type="text"] { font: 400 11px Verdana; padding: 4px; border: 1px solid #ccc; }

/* Pagination */
.pagination { text-align: center; margin-top: 15px; }
.pagination a, .pagination span { padding: 4px 10px; margin: 0 2px; border: 1px solid #ccc; font-size: 11px; }
.pagination span.current { background: #660000; color: #fff; border-color: #660000; }
.pagination a:hover { background: #fcebdf; text-decoration: none; }

/* Info box */
.info-box { padding: 10px; border-radius: 3px; margin-bottom: 15px; }
.info-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.info-error { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }

/* Footer */
.footer { background: #660000; color: #fff; text-align: center; padding: 10px; font-size: 10px; }
.footer a { color: #FFcc66; }

/* Admin panel */
.admin-panel { background: #fff3cd; border: 1px solid #ffc107; padding: 10px; margin-bottom: 15px; border-radius: 3px; }
.admin-panel h3 { margin: 0 0 8px 0; font-size: 11px; color: #856404; }

/* Login page */
.login-page-body { background: url('/image/bg-sky.jpg') no-repeat center center fixed; background-size: cover; }
.login-box { width: 400px; padding: 30px; border: 1px solid #C2CFD8; border-radius: 5px; background: rgba(255,255,255,0.96); box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.login-logo { text-align: center; margin-bottom: 15px; }
.login-logo img { max-width: 100%; height: auto; }

/* Dedicated admin reply header */
.reply-header.dedicated { background: #5b2c6f; color: #fff; }

/* ========================================================
   LOGIN/REGISTER PAGE POLISH (added at end of style.css)
   ======================================================== */

/* Background overlay so the bg image doesn't overpower content */
.login-page-body { position: relative; min-height: 100vh; }
.login-page-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(102,0,0,0.55) 0%, rgba(28,28,28,0.45) 100%);
    z-index: 0;
    pointer-events: none;
}
.login-page-body > .container { position: relative; z-index: 1; background: transparent !important; }

/* Login card — modern shadow, more padding, centered properly */
.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.30), 0 6px 14px rgba(0,0,0,0.18);
    margin: 0 auto;
    box-sizing: border-box;
}
.login-box h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px !important;
    margin: 0 0 6px;
    text-align: center;
    color: #4a0000 !important;
    border: none !important;
    padding: 0 !important;
}
.login-box .login-subtitle {
    text-align: center;
    color: #888;
    font-size: 12px;
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}

/* Form group spacing */
.login-box .form-group { margin-bottom: 16px; }
.login-box .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Form inputs — modern with focus ring */
.login-box input[type=text],
.login-box input[type=email],
.login-box input[type=tel],
.login-box input[type=password] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.login-box input:focus {
    outline: none;
    border-color: #660000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102,0,0,0.12);
}

/* Primary button (Log Masuk) — SCOPED to login pages only */
.login-box .btn-primary, .login-box button[type=submit] {
    background: #660000;
    color: #fff;
    border: 0;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    width: 100%;
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(102,0,0,0.25);
}
.login-box .btn-primary:hover, .login-box button[type=submit]:hover {
    background: #4d0000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,0,0,0.35);
}
.login-box .btn-primary:active { transform: translateY(0); }

/* Secondary button (Daftar Akaun) */
.btn-secondary, .login-box .btn-secondary {
    display: inline-block;
    background: #fff;
    color: #660000;
    border: 1.5px solid #660000;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}
.btn-secondary:hover, .login-box .btn-secondary:hover {
    background: #660000;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102,0,0,0.25);
}

/* Login secondary actions area (links bar at bottom) */
.login-actions {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    text-align: center;
}
.login-actions a {
    color: #660000;
    font-size: 12px;
    text-decoration: none;
    margin: 0 6px;
}
.login-actions a:hover { text-decoration: underline; }
.login-actions .lang-toggle {
    font-weight: 700;
    background: rgba(102,0,0,0.08);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Bantuan as floating action button (FAB) */
.bantuan-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.9);
}
.bantuan-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.40);
}
.bantuan-fab img { width: 100%; height: 100%; object-fit: cover; }

/* Make header bar a bit cleaner — drop subtitle if exists */
.login-page-body .topbar { display: none; }

/* Login page footer */
.login-footer {
    text-align: center;
    padding: 14px;
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.4);
    margin-top: auto;
}
.login-footer a { color: rgba(255,255,255,0.95); text-decoration: none; margin: 0 6px; }
.login-footer a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 600px) {
    .login-box { padding: 28px 22px; max-width: 92%; }
    .bantuan-fab { width: 54px; height: 54px; bottom: 16px; right: 16px; }
}

/* Register form — keep wider */
.register-page-body .login-box { max-width: 560px; }
.register-page-body fieldset {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: #fafafa;
}
.register-page-body fieldset legend {
    font-size: 12px;
    font-weight: 600;
    color: #660000;
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ========== Polish v2: animations + interactivity ========== */
@keyframes card-fade-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.login-box {
    animation: card-fade-in 400ms cubic-bezier(.22,.99,.32,1);
}

@keyframes fab-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.bantuan-fab { animation: fab-bob 3s ease-in-out infinite; }
.bantuan-fab:hover { animation: none; transform: scale(1.08); }

/* Loading state for submit button */
.btn-loading {
    pointer-events: none;
    opacity: 0.85;
    position: relative;
    color: transparent !important;
}
.btn-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Password strength meter */
.pw-strength { margin-top: 6px; }
.pw-strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}
.pw-strength-bar-fill {
    height: 100%;
    width: 0;
    transition: width 0.25s, background 0.25s;
    background: #dc3545;
}
.pw-strength-text { font-size: 11px; color: #666; margin-top: 2px; }
.pw-strength.s1 .pw-strength-bar-fill { width: 25%;  background: #dc3545; }
.pw-strength.s2 .pw-strength-bar-fill { width: 50%;  background: #ffc107; }
.pw-strength.s3 .pw-strength-bar-fill { width: 75%;  background: #2ea043; }
.pw-strength.s4 .pw-strength-bar-fill { width: 100%; background: #1f8a3a; }
.pw-strength.s1 .pw-strength-text { color: #dc3545; }
.pw-strength.s2 .pw-strength-text { color: #b88a00; }
.pw-strength.s3 .pw-strength-text { color: #2ea043; }
.pw-strength.s4 .pw-strength-text { color: #1f8a3a; font-weight: 600; }

/* Forgot password link */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #888;
    margin: -8px 0 14px;
    text-decoration: none;
}
.forgot-link:hover { color: #660000; text-decoration: underline; }
