@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --sidebar-bg: #3c4454;
    --sidebar-text: #c0c6d1;
    --sidebar-hover: #485264;
    --primary-accent: #ed657d;
    --primary-accent-hover: #d85068;
    --topbar-bg: #4c5464;
    --bg-color: #f0f3f6;
    --card-bg: #ffffff;
    --text-color: #555555;
    --text-muted: #888888;
    --border-color: #e0e4e8;
    --success: #a0c46b;
    --warning: #f8c86d;
    --danger: #ed657d;
    --info: #6da2f8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* Utilities */
.btn-primary {
    background-color: var(--primary-accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.card {
    background-color: var(--card-bg);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #444;
}

.card-header.accent-border {
    border-left: 4px solid var(--primary-accent);
}

.card-body {
    padding: 20px;
}

.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-user {
    background-color: var(--primary-accent);
    color: white;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.sidebar-nav {
    list-style: none;
    padding-top: 10px;
}

.sidebar-nav li a, .sidebar-nav li button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-size: 14px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav li a:hover, .sidebar-nav li button:hover {
    background-color: var(--sidebar-hover);
    color: white;
}

.sidebar-nav li.active > a, .sidebar-nav li.active > button {
    background-color: var(--sidebar-hover);
    color: white;
    border-left: 4px solid var(--primary-accent);
}

.badge {
    background-color: var(--success);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.topbar {
    height: 60px;
    background-color: var(--topbar-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
}

.topbar-title {
    font-size: 18px;
    font-style: italic;
    font-weight: 600;
}

.topbar-search {
    display: flex;
    align-items: center;
}

.topbar-search input {
    padding: 8px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    outline: none;
    width: 250px;
}

.topbar-search button {
    padding: 8px 15px;
    border: none;
    background-color: var(--primary-accent);
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Content Area */
.content {
    padding: 30px;
    overflow-y: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 500;
    color: #333;
}

/* Layout Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Tasks List */
.task-list {
    list-style: none;
}
.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.task-item:last-child {
    border-bottom: none;
}
.task-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.task-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}
.task-checkbox.checked {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}
.task-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: white;
    font-weight: 600;
}

/* Progress Bars */
.progress-container {
    margin-bottom: 15px;
}
.progress-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}
.progress-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background-color: var(--sidebar-bg);
}

/* Circular Chart */
.circle-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.circle-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 30px solid var(--sidebar-bg);
    border-top-color: var(--sidebar-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Login specific styles */
.login-page {
    height: 100vh;
    display: flex;
    width: 100%;
    background-color: var(--sidebar-bg);
    overflow: hidden;
}

.login-image-section {
    flex: 1.2;
    display: none;
    background-image: url('../images/login_car_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.login-image-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    color: white;
}

.login-image-overlay h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    letter-spacing: -1px;
}

.login-image-overlay p {
    font-size: 18px;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.6;
    max-width: 500px;
}

@media (min-width: 900px) {
    .login-image-section {
        display: block;
    }
}

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    padding: 20px;
    position: relative;
}

.login-box {
    background: white;
    padding: 50px 45px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 480px;
}

.login-logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--sidebar-bg);
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: -1px;
}
.login-logo span {
    color: var(--primary-accent);
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    background-color: white;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 4px rgba(237, 101, 125, 0.15);
}

.error-message {
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.login-box .btn-primary {
    padding: 15px;
    font-size: 16px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(237, 101, 125, 0.25);
    width: 100%;
}
.login-box .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 101, 125, 0.35);
}

/* KPI Panels */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.kpi-card {
    border-radius: 8px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-card-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.kpi-card-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.kpi-card-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.kpi-card-yellow {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.kpi-content {
    position: relative;
    z-index: 2;
}

.kpi-number {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1;
}

.kpi-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
}

.kpi-subtitle {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.kpi-link {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.kpi-link:hover {
    text-decoration: underline;
}

.kpi-icon-bg {
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-size: 90px;
    opacity: 0.15;
    z-index: 1;
    transform: rotate(-15deg);
}

/* Dashboard Banner */
.dashboard-banner {
    background: linear-gradient(135deg, var(--topbar-bg) 0%, var(--primary-accent) 100%);
    border-radius: 8px;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(237, 101, 125, 0.2);
    position: relative;
    overflow: hidden;
}

.dashboard-banner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10l80 80M90 10L10 90" stroke="rgba(255,255,255,0.05)" stroke-width="20" fill="none"/></svg>') repeat;
    opacity: 0.5;
    pointer-events: none;
}

.dashboard-banner .banner-content {
    position: relative;
    z-index: 2;
}

.dashboard-banner .banner-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.dashboard-banner .banner-content p {
    font-size: 15px;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

.dashboard-banner .banner-icon {
    font-size: 60px;
    opacity: 0.15;
    position: relative;
    z-index: 2;
    transform: rotate(-10deg);
}
