/**
 * PROFISSA - Custom Styles
 */

/* ===== Variables ===== */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --sidebar-width: 260px;
    --header-height: 60px;
}

/* ===== Base ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
}

/* ===== Auth Layout ===== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link {
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link.active {
    background: var(--primary-color);
}

/* ===== Page Content ===== */
#page-content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ===== Header ===== */
header.navbar {
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ===== Cards ===== */
.card {
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
}

.hover-shadow {
    transition: box-shadow 0.2s, transform 0.2s;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ===== Chat ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 2rem);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.chat-input {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem;
    background: #fff;
}

.message {
    max-width: 80%;
    margin-bottom: 1rem;
}

.message-user {
    margin-left: auto;
}

.message-user .message-content {
    background: var(--primary-color);
    color: white;
    border-radius: 1rem 1rem 0.25rem 1rem;
}

.message-ai .message-content {
    background: #f3f4f6;
    border-radius: 1rem 1rem 1rem 0.25rem;
}

.message-content {
    padding: 0.75rem 1rem;
}

.message-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.message-user .message-time {
    text-align: right;
}

/* ===== Status Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.625rem;
}

/* ===== Avatar ===== */
.avatar-placeholder {
    font-weight: 600;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

/* ===== Forms ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
}

.input-group-text {
    border: 1px solid #dee2e6;
}

/* ===== Buttons ===== */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== Utilities ===== */
.transition {
    transition: all 0.2s ease;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    #page-content-wrapper {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ===== Loading ===== */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ===== Typing Indicator ===== */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

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

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

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
