/* =============================================
   Car Service & Maintenance Tracker - UI Revision
   Auto Miraj-inspired Light Theme
   ============================================= */

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

:root {
    --primary: #1976D2;
    /* Deep Blue */
    --primary-hover: #0D47A1;
    --dark: #212121;
    --dark-secondary: #424242;
    --light: #F5F5F5;
    --white: #FFFFFF;
    --text-main: #212121;
    --text-muted: #757575;
    --border: #E0E0E0;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.15);
    --radius: 4px;
    --radius-lg: 8px;
}

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

body {
    background: var(--light);
    color: var(--text-main);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar-custom {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-brand img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin-left: auto;
    margin-right: 40px;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    transition: color 0.3s;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-user {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-secondary);
}

.btn-primary-custom,
.btn-logout,
.btn-add,
.btn-submit {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    display: inline-block;
}

.btn-primary-custom:hover,
.btn-logout:hover,
.btn-add:hover,
.btn-submit:hover {
    background: var(--primary-hover);
    color: var(--white);
}

/* =============================================
   HERO SECTION (Auto Miraj Style)
   ============================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 600px;
    background: var(--white);
    display: flex;
    overflow: hidden;
}

.hero-left {
    width: 45%;
    padding: 100px 80px;
    position: relative;
    z-index: 2;
    background: var(--white);
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.hero-left::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 120px;
    background: var(--primary);
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 100%);
    z-index: -1;
}

.hero-subtitle {
    font-family: 'Oswald', sans-serif;
    color: var(--primary);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 5px;
    display: block;
}

.hero-title {
    font-size: 4.5rem;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--dark-secondary);
    max-width: 400px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-stats-overlay {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 350px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.stat-box {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
}

.stat-box:last-child {
    border-bottom: none;
}

.stat-box .small-text {
    font-family: 'Oswald', sans-serif;
    color: var(--white);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-box .big-text {
    color: var(--primary);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-box .desc-text {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* =============================================
   PAGE CONTENT (Forms, Tables, Cards)
   ============================================= */
.page-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 40px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 10px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 30px;
    border-top: 5px solid var(--primary);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.card h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.card-badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--light);
    color: var(--dark-secondary);
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.card-badge.blue {
    background: rgba(25, 118, 210, 0.1);
    color: var(--primary);
    border-color: rgba(25, 118, 210, 0.2);
}

.card-stat {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}

.card-stat:last-child {
    border-bottom: none;
}

.card-stat .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-stat .val {
    color: var(--dark);
    font-weight: 700;
}

.card-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn-sm-danger,
.btn-sm-success,
.btn-sm-secondary {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    display: inline-block;
}

.btn-sm-danger {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-sm-danger:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm-success {
    background: #2E7D32;
    color: var(--white);
    border: 1px solid #2E7D32;
}

.btn-sm-secondary {
    background: var(--dark-secondary);
    color: var(--white);
}

/* Auth Pages (Login/Register) */
.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 40px;
}

.auth-right {
    flex: 1;
    background-image: url('../images/autocare_hero.png');
    background-size: cover;
    background-position: center;
    position: relative;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

.auth-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(25, 118, 210, 0.2);
}

.auth-form-container {
    width: 100%;
    max-width: 450px;
}

.auth-form-container .logo-area {
    margin-bottom: 40px;
}

.auth-form-container h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--light);
    color: var(--dark);
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

/* Forms Add Pages */
.form-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    border-top: 5px solid var(--primary);
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.btn-secondary-custom {
    padding: 12px 28px;
    background: var(--light);
    border: 1px solid var(--border);
    color: var(--dark-secondary);
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius);
    display: inline-block;
}

.btn-secondary-custom:hover {
    background: var(--border);
}

/* Data Tables */
.data-table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--dark);
    color: var(--white);
    padding: 15px 20px;
    text-align: left;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--dark-secondary);
}

.data-table tr:hover td {
    background: var(--light);
}

.alert-box {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #C62828;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid #2E7D32;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-top: 15px;
}