/* FEZA LOGISTICS - Custom Styles */

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1a1e2e;
    --primary-accent: #0d6efd;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg) !important;
    transition: width 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.sidebar-header {
    background: rgba(0,0,0,0.2);
}

.sidebar-link {
    color: #a8b3c5 !important;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
    transform: translateX(3px);
}

.sidebar-link.active {
    background: var(--primary-accent);
    color: #fff !important;
}

.sidebar-link i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f4f6fc;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-1px);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Login Page */
.login-wrapper {
    background: linear-gradient(135deg, #1a1e2e 0%, #0d6efd 100%);
}

.login-card {
    border-radius: 16px;
}

/* Progress bars */
.progress {
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 5px 10px;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    .sidebar.show {
        width: var(--sidebar-width);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
}

/* Step status colors */
.table-success {
    background-color: rgba(25, 135, 84, 0.08) !important;
}

.table-warning {
    background-color: rgba(255, 193, 7, 0.08) !important;
}

.table-danger {
    background-color: rgba(220, 53, 69, 0.08) !important;
}

/* ── AI Writing Assistant Widget ── */
.ai-assist-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #6f42c1;
    background: rgba(111, 66, 193, 0.06);
    border: 1px solid rgba(111, 66, 193, 0.25);
    border-radius: 14px;
    padding: 2px 10px;
    opacity: 0.8;
    transition: all 0.2s;
    cursor: pointer;
}

.ai-assist-trigger:hover {
    opacity: 1;
    background: #6f42c1;
    color: #fff;
    border-color: #6f42c1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.3);
}

.ai-assist-panel {
    background: #fff;
    border: 1px solid rgba(111, 66, 193, 0.3);
    border-radius: 10px;
    margin-top: 6px;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: aiPanelSlideIn 0.2s ease;
}

@keyframes aiPanelSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-assist-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.06), rgba(13, 110, 253, 0.04));
    border-bottom: 1px solid rgba(111, 66, 193, 0.12);
    font-size: 0.85rem;
}

.text-purple {
    color: #6f42c1 !important;
}

.ai-assist-panel-body {
    padding: 10px 12px;
}

.ai-assist-loading {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.ai-assist-result-text {
    background: rgba(111, 66, 193, 0.04);
    border: 1px solid rgba(111, 66, 193, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}
