/* Premium Stylesheet - Kargo Takip ve Çağrı Merkezi Yönetim Sistemi */

:root {
    /* Dark Theme (Default) */
    --bg-body: hsl(220, 20%, 10%);
    --bg-card: hsla(220, 20%, 14%, 0.85);
    --bg-sidebar: hsla(220, 20%, 12%, 0.7);
    --border-color: hsla(0, 0%, 100%, 0.07);
    --text-main: hsl(220, 15%, 85%);
    --text-muted: hsl(220, 10%, 60%);
    --text-heading: hsl(0, 0%, 100%);
    --sidebar-active-glow: rgba(0, 119, 255, 0.15);
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --input-bg: hsla(220, 20%, 18%, 0.6);
    --glass-blur: 18px;
    --card-hover-y: -4px;
}

[data-bs-theme="light"] {
    /* Light Theme */
    --bg-body: hsl(220, 20%, 97%);
    --bg-card: hsla(0, 0%, 100%, 0.9);
    --bg-sidebar: hsla(220, 20%, 93%, 0.85);
    --border-color: hsla(220, 20%, 10%, 0.08);
    --text-main: hsl(220, 20%, 25%);
    --text-muted: hsl(220, 10%, 50%);
    --text-heading: hsl(220, 20%, 10%);
    --sidebar-active-glow: rgba(0, 119, 255, 0.08);
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    --input-bg: hsl(0, 0%, 100%);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .outfit-font {
    font-family: 'Outfit', sans-serif;
    color: var(--text-heading);
    font-weight: 600;
}

/* Sidebar Glassmorphism */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1.25rem;
    }
}

/* Logo Brand */
.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.brand-logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, hsl(20, 100%, 50%), hsl(5, 100%, 50%));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(255, 60, 0, 0.4);
    font-size: 1.3rem;
    font-family: 'Outfit', sans-serif;
}

/* Sidebar navigation links */
.nav-item-custom {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.4rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.nav-item-custom:hover {
    color: var(--text-heading);
    background-color: hsla(0, 0%, 50%, 0.05);
    transform: translateX(4px);
}

.nav-item-custom.active {
    color: hsl(210, 100%, 55%);
    background-color: var(--sidebar-active-glow);
    border-color: hsla(210, 100%, 55%, 0.15);
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(0, 120, 255, 0.05);
}

.nav-item-custom i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

/* Custom premium Card */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-custom:hover {
    transform: translateY(var(--card-hover-y));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Top header Navbar */
.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

/* Input custom override styles */
.form-control-custom {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
}

.form-control-custom:focus {
    background-color: var(--input-bg);
    border-color: hsl(210, 100%, 55%);
    color: var(--text-heading) !important;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.25);
    outline: none;
}

/* Star rating select component */
.star-rating-custom {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    font-size: 1.6rem;
}

.star-rating-custom input {
    display: none;
}

.star-rating-custom label {
    color: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: color 0.15s ease;
}

.star-rating-custom label:hover,
.star-rating-custom label:hover ~ label,
.star-rating-custom input:checked ~ label {
    color: hsl(40, 95%, 50%) !important;
}

/* Soft Badges */
.badge-soft {
    padding: 0.35em 0.8em;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
}

.badge-soft-success {
    background-color: hsla(150, 80%, 40%, 0.15);
    color: hsl(150, 80%, 40%) !important;
}

.badge-soft-danger {
    background-color: hsla(350, 90%, 55%, 0.15);
    color: hsl(350, 90%, 55%) !important;
}

.badge-soft-warning {
    background-color: hsla(40, 95%, 50%, 0.15);
    color: hsl(40, 95%, 50%) !important;
}

.badge-soft-info {
    background-color: hsla(180, 80%, 45%, 0.15);
    color: hsl(180, 80%, 45%) !important;
}

.badge-soft-secondary {
    background-color: hsla(220, 10%, 60%, 0.15);
    color: hsl(220, 10%, 60%) !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: hsl(210, 100%, 55%);
    color: hsl(210, 100%, 55%);
    transform: scale(1.05);
}

/* User Footer Box */
.sidebar-user-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: hsl(210, 100%, 55%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 10px rgba(0, 119, 255, 0.3);
}

/* Dialer simulator overlay card */
.calling-dialer-card {
    background-color: hsl(220, 25%, 8%);
    border: 2px solid hsl(210, 100%, 55%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 120, 255, 0.4);
    padding: 2rem;
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    z-index: 2000;
    animation: slideUpDialer 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.calling-pulsing-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 120, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    position: relative;
}

.calling-pulsing-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
    animation: pulseWave 1.6s infinite ease-out;
}

@keyframes pulseWave {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Cargo movement vertical timeline */
.cargo-timeline {
    position: relative;
    padding-left: 30px;
    margin-left: 10px;
    border-left: 2px dashed var(--border-color);
}

.timeline-event-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-event-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 3px solid var(--bg-card);
    transition: background-color 0.2s ease;
}

.timeline-event-item.active::before {
    background-color: hsl(210, 100%, 55%);
    box-shadow: 0 0 10px rgba(0, 120, 255, 0.5);
}

.timeline-event-item.delivered::before {
    background-color: hsl(150, 80%, 40%);
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.5);
}

/* Quick KPI cards icons glow */
.icon-glow-container {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.glow-primary {
    background-color: hsla(210, 100%, 55%, 0.12);
    color: hsl(210, 100%, 55%);
    box-shadow: 0 4px 20px hsla(210, 100%, 55%, 0.15);
}

.glow-success {
    background-color: hsla(150, 80%, 40%, 0.12);
    color: hsl(150, 80%, 40%);
    box-shadow: 0 4px 20px hsla(150, 80%, 40%, 0.15);
}

.glow-warning {
    background-color: hsla(40, 95%, 50%, 0.12);
    color: hsl(40, 95%, 50%);
    box-shadow: 0 4px 20px hsla(40, 95%, 50%, 0.15);
}

.glow-danger {
    background-color: hsla(350, 90%, 55%, 0.12);
    color: hsl(350, 90%, 55%);
    box-shadow: 0 4px 20px hsla(350, 90%, 55%, 0.15);
}

.glow-info {
    background-color: hsla(180, 80%, 45%, 0.12);
    color: hsl(180, 80%, 45%);
    box-shadow: 0 4px 20px hsla(180, 80%, 45%, 0.15);
}

.card-stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.card-stat-number {
    font-size: 2.1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    color: var(--text-heading);
}

.trend-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}
