.login-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.close-modal:hover {
    color: #666;
}

.mini-modal {
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    margin: 20px;
    animation: modalPop 0.2s ease-out;
}

.login-modal-content {
    position: relative;
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    max-height: 85vh;
    margin: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    animation: modalPop 0.3s ease-out;
    overflow: auto;
}

.mini-modal-header {
    text-align: right;
    padding: 8px;
}

.mini-modal-content {
    padding: 0 20px 20px;
    text-align: center;
}

.mini-modal-content h3 {
    margin: 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mini-modal-content p {
    margin: 8px 0 16px;
    font-size: 14px;
    color: #666;
}

.mini-modal-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: #f5f5f5;
}

.login-modal-body {
    padding: 16px;
}

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

.login-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-description {
    margin: 0 0 24px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.mini-modal-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #92041d;
    color: white;
    border: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-link {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    text-decoration: underline;
}

.modal-btn-primary {
    background: #92041d;
    color: white;
}

.modal-btn-primary:hover {
    background: #8b2662;
}

.modal-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-btn-secondary:hover {
    background: #eee;
}

.modal-btn-ghost {
    background: none;
    color: #999;
    font-size: 14px;
    padding: 8px;
}

.modal-btn-ghost:hover {
    color: #666;
    background: #f8f8f8;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-modal.active {
    display: flex;
}

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* removed duplicate .login-modal-content block (compact version is defined earlier) */

.login-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

/* .close-modal styles are defined earlier (keep single source of truth) */

.login-modal-body {
    padding: 24px;
}

.modal-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.tab-button {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.modal-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px; /* kasih ruang biar teks gak ketimpa icon */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-btn-primary:hover {
    background: var(--primary-dark);
}

.register-redirect {
    text-align: center;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
}

.register-info {
    margin-bottom: 24px;
}

.register-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.register-info h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.register-info p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.login-redirect {
    text-align: center;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 12px;
}

.login-info {
    margin-bottom: 24px;
}

.login-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.login-info h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.login-info p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@media (max-width: 480px) {
    .login-modal-content {
        margin: 0;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

#togglePassword {
  position: absolute;
  right: 12px;
  top: 65%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}

#togglePassword:hover {
  color: #000;
}