/* =======================================================
   File CSS Komponen (component.css)
   Berisi style untuk halaman-halaman spesifik.
   ======================================================= */

/* =======================================================
   CSS: Halaman Login (auth/login_page.php)
   ======================================================= */
.login-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 450px;
    margin: 40px auto;
    padding: 30px;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.login-page-container h1 {
    color: var(--accent);
    margin-top: 0;
}

.login-page-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
}

.google-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4285f4, #2e6de9);
    border-radius: 999px;
    border: none;
    padding: 0;
    margin-top: 20px;
    box-shadow: 0 14px 28px rgba(66, 133, 244, 0.35);
    transition: transform .2s ease, box-shadow .2s ease;
}

.google-login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(66, 133, 244, 0.4);
}

.google-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 999px 0 0 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.google-button-text {
    padding: 12px 20px;
    flex-grow: 1;
}

/* =======================================================
   CSS: Halaman Cari (cari.php)
   ======================================================= */
.search-page-header {
    display: flex;
    flex-direction: column;
    /* MOBILE (Default): Susun ke bawah */
    align-items: center;
    /* MOBILE (Default): Pusatkan */
    gap: 20px;
    margin-bottom: 30px;
}

.search-page-header .main-search-container {
    width: 100%;
    max-width: 600px;
    /* Lebar maks di mobile */
    display: flex;
    justify-content: center;
}

.search-results-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px;
    border-left: 6px solid var(--accent);
    padding-left: 18px;
    color: var(--text-primary);
}

/* Di Desktop, ubah layout jadi baris */
@media (min-width: 993px) {
    .search-page-header {
        flex-direction: row;
        /* DESKTOP: Susun ke samping */
        justify-content: space-between;
        /* DESKTOP: Logo kiri, Search kanan */
        align-items: center;
    }

    .search-page-header .main-search-container {
        width: 250px;
        /* Kembalikan kelebar normal di desktop */
        max-width: 250px;
        justify-content: flex-start;
        /* Kembalikan ke default di desktop */
    }
}


/* =======================================================
   CSS: HALAMAN REDEEM & AKUN
   ======================================================= */

/* (1) Style untuk Halaman Redeem */
.redeem-card {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    padding: 28px 34px;
    margin-bottom: 30px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.redeem-status-card {
    text-align: center;
}

.redeem-status-card h2 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
}

.redeem-status-card .status-level {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    line-height: 1;
}

.redeem-status-card .status-level.premium {
    color: var(--accent);
}

.redeem-status-card .status-level.free {
    color: var(--text-primary);
}

.redeem-status-card .status-expiry {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.redeem-form-card {
    text-align: center;
}

.redeem-form-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 0;
}

.redeem-form-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.form-message {
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.form-message.success {
    background: rgba(34, 179, 110, 0.12);
    border: 1px solid rgba(34, 179, 110, 0.3);
    color: var(--accent-dark);
}

.form-message.error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #b91c1c;
}

.redeem-card .lock-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.redeem-card .lock-input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--surface-muted);
    color: var(--text-primary);
    font-size: 16px;
    box-sizing: border-box;
    text-align: center;
}

.redeem-card .lock-input:focus {
    outline: none;
    border-color: rgba(34, 179, 110, 0.4);
    box-shadow: 0 0 0 3px rgba(34, 179, 110, 0.2);
}

.redeem-card .btn-unlock {
    background: linear-gradient(135deg, var(--accent), #2dd37d);
    color: #fff;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease-in-out;
    margin-top: 24px;
    box-shadow: 0 16px 30px rgba(34, 179, 110, 0.25);
}

.redeem-card .btn-unlock:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(34, 179, 110, 0.28);
}

/* (2) Style untuk Halaman Akun (profile.php) */
.profile-page-card {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-sm);
}

.profile-user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
}

.profile-user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(34, 179, 110, 0.25);
}

.profile-user-info {
    margin-top: 15px;
}

.profile-user-info h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin: 0;
}

.profile-user-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    justify-content: center;
    flex-wrap: wrap;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.profile-stat-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.profile-stat-item strong {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.profile-stat-item strong.premium {
    color: var(--accent);
}

.profile-action-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.profile-action-card:hover {
    background-color: var(--surface-muted);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.profile-action-text h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.profile-action-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.profile-menu-caret {
    width: 24px;
    height: 24px;
    fill: var(--text-muted);
    flex-shrink: 0;
    margin-left: 15px;
}

.profile-menu-list {
    padding: 10px 0;
}

.profile-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 25px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-soft);
    transition: background-color 0.2s;
}

.profile-menu-list a:last-child {
    border-bottom: none;
}

.profile-menu-item:hover {
    background-color: var(--surface-muted);
}

.profile-menu-item.danger span {
    color: #dc2626;
}

.profile-menu-item.danger svg {
    fill: #dc2626;
}

/* =======================================================
   CSS: Halaman Pusat Bantuan (help_center.php)
   ======================================================= */
.ticket-card {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    padding: 24px 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.ticket-form-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 0;
}

.ticket-form-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

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

.ticket-form .form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ticket-form .lock-input {
    width: 100%;
    text-align: left;
}

.ticket-form textarea.lock-input {
    min-height: 120px;
    resize: vertical;
}

.ticket-form .btn-unlock {
    margin-top: 0;
}

.ticket-list-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 0;
}

.ticket-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    text-decoration: none;
    border-bottom: 1px solid var(--border-soft);
}

.ticket-list-item:last-child {
    border-bottom: none;
}

.ticket-list-item:hover .ticket-item-info h3 {
    color: var(--accent);
}

.ticket-item-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 4px 0;
    transition: color 0.2s;
}

.ticket-item-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.ticket-status {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 15px;
    text-transform: uppercase;
}

.ticket-status.status-open {
    color: var(--accent);
    background-color: rgba(50, 208, 129, 0.18);
}

.ticket-status.status-pending {
    color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.18);
}

.ticket-status.status-resolved {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.18);
}

/* =======================================================
   CSS: Halaman Lihat Tiket (view_ticket.php)
   ======================================================= */
.ticket-header {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.ticket-back-btn {
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.ticket-back-btn:hover {
    text-decoration: underline;
}

.ticket-chat-container {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: var(--surface-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

.chat-bubble-wrapper {
    display: flex;
    gap: 15px;
    max-width: 85%;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-bubble {
    border-radius: 18px;
    padding: 12px 18px;
}

.chat-bubble .chat-body {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.chat-bubble .chat-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.chat-bubble-wrapper.chat-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-bubble-wrapper.chat-user .chat-bubble {
    background: linear-gradient(135deg, var(--accent), #3fe48f);
    border-top-right-radius: 4px;
    color: #04140d;
}

.chat-bubble-wrapper.chat-user .chat-bubble .chat-meta {
    text-align: right;
    color: rgba(4, 20, 13, 0.55);
}

.chat-bubble-wrapper.chat-admin {
    align-self: flex-start;
}

.chat-bubble-wrapper.chat-admin .chat-bubble {
    background-color: var(--surface-muted);
    border-top-left-radius: 4px;
    border: 1px solid var(--border-soft);
}

.chat-bubble-wrapper.chat-admin .chat-bubble .chat-meta {
    text-align: left;
}

.ticket-reply-card {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: var(--surface-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 24px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.ticket-reply-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 0;
}

.ticket-reply-card .ticket-form {
    padding: 0;
    margin: 0;
}