/* ===== VARIABEL & BASE ===== */
:root {
    --cream: #fffbf4;
    --clear-white: #fdfdfd;
    --orange-brand: #FF6B00;
}

body {
    background-color: var(--cream);
    color: #1e1e2f;
}

.bg-clear-white {
    background-color: var(--clear-white);
}

input::-ms-reveal,
input::-ms-clear {
    display: none;
}

/* ===== GALLERY SLIDER ===== */
.gallery-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-slide img {
    transition: transform 5s ease-out;
    transform: scale(1);
}

.gallery-slide.active img {
    transform: scale(1.08);
}

/* ===== NAVBAR ===== */
.nav-link.active {
    color: var(--orange-brand);
    border-bottom: 2px solid var(--orange-brand);
    padding-bottom: 4px;
}

/* ===== CARD PRODUK ===== */
.card-white {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ===== FLIP CARD ===== */
.perspective {
    perspective: 1000px;
}

.transform-style-preserve-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-back .overflow-y-auto {
    scrollbar-width: thin;
}

.flip-card-back .overflow-y-auto::-webkit-scrollbar {
    width: 4px;
}

.flip-card-back .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.flip-card-back .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* ===== AUTH BACKGROUND ===== */
.auth-bg {
    background-color: var(--cream);
}

.bg-auth-full {
    background-color: var(--cream);
    position: relative;
    isolation: isolate;
}

.bg-auth-full::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='rgba(255,107,0,0.08)' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

.bg-auth-full::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255,107,0,0.1) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.auth-blur-circles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.auth-blur-circles div {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.auth-blur-circles div:first-child {
    background: #FF6B00;
    top: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite;
}

.auth-blur-circles div:last-child {
    background: #FFB347;
    bottom: -100px;
    right: -100px;
    animation: float 12s ease-in-out infinite reverse;
}

/* ===== ANIMASI ===== */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.animate-float {
    animation: float 8s ease-in-out infinite;
}

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

.profile-animate {
    animation: fadeSlideUp 0.6s ease-out forwards;
}

/* ===== FORM PATTERN ===== */
.bg-form-pattern {
    background-color: var(--cream, #fffbf4);
    background-image: radial-gradient(circle at 2px 2px, rgba(255,107,0,0.1) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

/* ===== CHATBOT FLOAT ===== */
.chatbot-float {
    display: inline-flex;
    background-color: white;
    border-radius: 9999px;
    padding: 1rem;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.chatbot-float:hover {
    box-shadow: 0 25px 30px -5px rgba(0,0,0,0.15);
}

/* ===== CHATBOT PAGE ===== */
.chat-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.chat-scroll-area {
    flex: 1;
    overflow-y: auto;
    background: white;
    padding: 1rem 2rem;
}

.welcome-section {
    max-width: 800px;
    margin: 4rem auto;
    text-align: center;
}

.welcome-greeting {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.greeting-text {
    color: #FF6B00;
}

.user-name {
    color: #1f2937;
}

.welcome-sub {
    font-size: 1.125rem;
    color: #4b5563;
}

.input-area {
    flex-shrink: 0;
    background: white;
    padding: 1rem 1.5rem;
    border-top: none;
}

.input-container {
    max-width: 800px;
    margin: 0 auto;
}

.chat-message-container {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.chat-message-container.flex-row-reverse {
    flex-direction: row-reverse;
}

.chat-message-wrapper {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.chat-message-container.flex-row-reverse .chat-message-wrapper {
    margin-left: auto;
}

.chat-message {
    border-radius: 1.25rem;
    padding: 0.75rem 1rem;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.user-message {
    background-color: #FF6B00;
    color: white;
    border-top-right-radius: 0.25rem;
}

.assistant-message {
    background-color: #f3f4f6;
    color: #1f2937;
    border-top-left-radius: 0.25rem;
    border: 1px solid #e5e7eb;
}

.assistant-message ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.assistant-message li {
    margin: 0.25rem 0;
}

.assistant-message strong {
    font-weight: 600;
}

.message-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.message-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    color: #9ca3af;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.message-actions button:hover {
    color: #FF6B00;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9ca3af;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== TRANSAKSI CARDS ===== */
.card-transaksi {
    transition: all 0.2s ease;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.card-transaksi:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-riwayat {
    transition: all 0.2s ease;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.card-riwayat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.info-payment {
    border: 1px dashed #FF6B00;
    background-color: #fffaf5;
    border-radius: 0.75rem;
    padding: 1rem;
}

.dropdown-icon {
    transition: transform 0.2s;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* ===== INFORMASI PEMBAYARAN ===== */
.card-info {
    transition: all 0.2s ease;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb !important;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.rekening-card {
    transition: all 0.2s ease;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb !important;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.rekening-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.badge-bank {
    background: #FF6B00;
    color: white;
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-block;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #334155;
    margin-top: 0.5rem;
}

.info-row i {
    width: 1.25rem;
    color: #FF6B00;
}

.rekening-item-editing {
    opacity: 0.5;
    transition: opacity 0.2s;
    pointer-events: none;
}

/* ===== BUTTON UTILITIES ===== */
.btn-outline-orange {
    border: 1px solid #FF6B00;
    color: #FF6B00;
    transition: all 0.2s;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    cursor: pointer;
}

.btn-outline-orange:hover {
    background-color: #FF6B00;
    color: white;
}

.btn-outline-red {
    border: 1px solid #ef4444;
    color: #ef4444;
    transition: all 0.2s;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    cursor: pointer;
}

.btn-outline-red:hover {
    background-color: #ef4444;
    color: white;
}

/* ===== CKEDITOR CONTENT ===== */
.ck-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.ck-content ul, .ck-content ol {
    list-style: revert !important;
    padding-left: 1.5rem !important;
    margin: 0.5rem 0 !important;
}

.ck-content li {
    margin: 0.25rem 0;
}

.ck-content h1, .ck-content h2, .ck-content h3 {
    font-size: revert;
    font-weight: revert;
    margin: 0.5rem 0;
}

.ck-content p {
    margin: 0 0 0.5rem 0;
}

/* ===== GALLERY FORM ===== */
.counter-error {
    color: #dc2626;
}

.counter-warning {
    color: #eab308;
}

.char-counter {
    font-size: 0.75rem;
    text-align: right;
}

/* ===== PEMBELIAN FORM ===== */
input[type="number"].no-spinner::-webkit-inner-spin-button,
input[type="number"].no-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"].no-spinner {
    -moz-appearance: textfield;
    appearance: textfield;
}

.rekening-radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.rekening-radio:hover {
    background-color: #fef3c7;
    border-color: #FF6B00;
}

.rekening-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #FF6B00;
    border-radius: 50%;
    background-color: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.rekening-radio input[type="radio"]:checked {
    background-color: #FF6B00;
    border-color: #FF6B00;
}

.rekening-radio input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.link-bukti {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #FF6B00;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    margin-top: 0.75rem;
}

.link-bukti:hover {
    background-color: #FF6B00;
    color: white;
    text-decoration: none;
}

.disabled-blur {
    opacity: 0.6;
    filter: grayscale(0.1);
}

.disabled-blur .total-harga-text {
    color: #9ca3af !important;
}

.jumlah-wrapper.disabled-blur input,
.jumlah-wrapper.disabled-blur button {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-produk {
    height: auto;
    display: block;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.accordion-content.open {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.prose-list {
    list-style: revert;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .chat-message-wrapper {
        max-width: 85%;
    }
    .chat-scroll-area {
        padding: 1rem;
    }
    .welcome-greeting {
        font-size: 1.5rem;
    }
}

/* ===== GLOBAL FORM CARD ===== */
.card-form {
    transition: all 0.2s ease;
    background: white;
    border-radius: 0.75rem !important;
    border: 1px solid #FF6B00 !important;
    border-left: 4px solid #FF6B00 !important;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.card-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ===== GLOBAL BUTTONS ===== */
.btn-orange {
    border: 2px solid #FF6B00 !important;
    color: #FF6B00 !important;
    font-weight: 700 !important;
    border-radius: 0.375rem !important;
    background-color: transparent !important;
    transition: all 0.2s;
}
.btn-orange:hover {
    background-color: #fffaf5 !important;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.1);
}

.btn-red {
    border: 2px solid #ef4444 !important;
    color: #ef4444 !important;
    font-weight: 700 !important;
    border-radius: 0.375rem !important;
    background-color: transparent !important;
    transition: all 0.2s;
}
.btn-red:hover {
    background-color: #fef2f2 !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}
