﻿/* public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    --secondary: #10B981;
    /* Emerald 500 */
    --bg-body: #F3F4F6;
    --bg-card: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 0.75rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* PDF.js Text Layer - Keep text transparent */
.textLayer,
.textLayer span,
.textLayer br {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff 0%, #fae8ff 100%);
}

.auth-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    .auth-title {
        font-size: 1.5rem;
    }
}

/* Dashboard Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #EEF2FF;
    color: var(--primary);
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 1rem;
}

@media screen and (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
}

.card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Chat / Bimbingan */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 80%;
}

.message.self {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-bubble {
    background-color: white;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.message.self .message-bubble {
    background-color: var(--primary);
    color: white;
    border: none;
}

.message-meta {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.file-attachment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    text-decoration: none;
}

.message.self .file-attachment {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-pending {
    background: #FEF3C7;
    color: #D97706;
}

.tag-approved {
    background: #D1FAE5;
    color: #059669;
}

.tag-rejected {
    background: #FEE2E2;
    color: #DC2626;
}

.tag-completed {
    background: #E0E7FF;
    color: #4338CA;
}

.collapse-section {
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out;
    max-height: 2000px;
    /* Arbitrary large height */
    opacity: 1;
}

.collapse-section.collapsed {
    max-height: 0;
    opacity: 0;
}

@media screen and (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
}

/* Logo Animations */
.logo-animate-spin {
    animation: spin 10s linear infinite;
}

.logo-animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.logo-animate-bounce {
    animation: bounce 2s infinite;
}

.logo-animate-fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

.logo-animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.logo-animate-soft-shake {
    animation: softShake 5s ease-in-out infinite;
}

@keyframes softShake {

    0%,
    50%,
    100% {
        transform: rotate(0deg);
    }

    /* Istirahat (Delay) */
    5% {
        transform: rotate(5deg);
    }

    /* Kanan */
    10% {
        transform: rotate(-5deg);
    }

    /* Kiri */
    15% {
        transform: rotate(5deg);
    }

    /* Kanan */
    20% {
        transform: rotate(-5deg);
    }

    /* Kiri */
    25% {
        transform: rotate(0deg);
    }

    /* Kembali Diam */
}


/* Dual Logo Reveal Animation */
.logo-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Mask the text initially */
    padding-right: 10px;
    /* Space for text to slide into */
    margin-bottom: 2rem;
}

.logo-part-icon {
    position: relative;
    z-index: 10;
    /* Icon stays on top */
    transition: transform 0.5s ease;
}

.logo-part-text {
    position: relative;
    z-index: 5;
    /* Text is behind */
    margin-left: 15px;
    /* Spacing */
    opacity: 0;
    transform: translateX(-100%);
    /* Start hidden behind icon */
    animation: slideReveal 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s;
    /* Wait for icon to settle */
}

@keyframes slideReveal {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Modern Logo Animations */
.logo-animate-flip {
    animation: flip3d 3s infinite;
    backface-visibility: visible;
}

.logo-animate-elastic {
    animation: elasticScale 2s infinite ease-in-out;
}

.logo-animate-shimmer {
    position: relative;
    overflow: hidden;
}

.logo-animate-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite;
}

.logo-animate-wobble {
    animation: wobble 2s infinite;
}

.logo-animate-heartbeat {
    animation: heartbeat 1.5s infinite;
}

@keyframes flip3d {
    0% {
        transform: perspective(400px) rotateY(0);
    }

    40% {
        transform: perspective(400px) rotateY(180deg);
    }

    50% {
        transform: perspective(400px) rotateY(180deg);
    }

    90% {
        transform: perspective(400px) rotateY(0);
    }

    100% {
        transform: perspective(400px) rotateY(0);
    }
}

@keyframes elasticScale {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    60% {
        transform: scale(1);
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    100% {
        left: 200%;
    }
}

@keyframes wobble {

    0%,
    100% {
        transform: translateX(0%);
        transform-origin: 50% 50%;
    }

    15% {
        transform: translateX(-6px) rotate(-6deg);
    }

    30% {
        transform: translateX(3px) rotate(6deg);
    }

    45% {
        transform: translateX(-3px) rotate(-3.6deg);
    }

    60% {
        transform: translateX(2px) rotate(2.4deg);
    }

    75% {
        transform: translateX(-1px) rotate(-1.2deg);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

    70% {
        transform: scale(1);
    }
}