/* TidyTime - Mobile-Responsive CSS */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --success-color: #10B981;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.main-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.navbar-brand a {
    text-decoration: none;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}


.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.navbar-nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-success {
    background-color: var(--success-color);
    color: white;
}

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

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

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

/* Hero Slider Section */
.hero-slider-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 300px;
    background-color: #6366f1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.5) 0%, rgba(67, 56, 202, 0.5) 100%);
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    color: white;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Owl Carousel Custom Styling */
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 50px;
    transition: all 0.3s ease;
    z-index: 10;
}

.owl-carousel .owl-nav button.owl-prev:hover,
.owl-carousel .owl-nav button.owl-next:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

.owl-carousel .owl-nav button.owl-prev {
    right: 20px;
    top: 35%;
    transform: translateY(-50%);
}

.owl-carousel .owl-nav button.owl-next {
    right: 20px;
    top: 65%;
    transform: translateY(-50%);
}

.owl-carousel .owl-nav button span {
    line-height: 50px;
}

.owl-carousel .owl-dots {
    display: none !important;
}

/* Hero Section (kept for other pages) */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.service-image,
.service-image-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-image-placeholder span {
    font-size: 4rem;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.service-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.service-duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.service-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
}

/* Features Grid */
.features {
    background-color: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background-color: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

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

.auth-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.auth-brand .brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer p {
    margin: 0.5rem 0;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    margin-top: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

.alert-danger {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #EF4444;
}

.alert-warning {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #F59E0B;
}

.alert-info {
    background-color: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #3B82F6;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: capitalize;
}

.badge-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.badge-danger {
    background-color: #FEE2E2;
    color: #991B1B;
}

.badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-info {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.badge-primary {
    background-color: #E0E7FF;
    color: #3730A3;
}

.badge-secondary {
    background-color: var(--bg-light);
    color: var(--text-secondary);
}

/* Cards */
.card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    background-color: var(--bg-light);
    color: var(--text-primary);
}

table tr:hover {
    background-color: var(--bg-light);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.sidebar-brand .brand-logo {
    font-size: 1.75rem;
    line-height: 1;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

/* Hide mobile menu elements on desktop */
.mobile-menu-toggle,
.sidebar-overlay,
.sidebar-close {
    display: none;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background-color: var(--bg-light);
}

/* Dashboard Container (newer pages) */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 60px);
    background: #f5f7fa;
}

.dashboard-main {
    flex: 1;
    padding: 2rem;
    margin-left: 250px;
    overflow-y: auto;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        display: none;
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.active {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .services-grid,
    .steps-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-white);
        transition: left 0.3s ease;
        z-index: 1000;
        border-right: 1px solid var(--border-color);
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 999;
        background: var(--primary-color);
        border: none;
        border-radius: 4px;
        width: 40px;
        height: 40px;
        padding: 0.5rem;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: white;
        margin: 4px 0;
        transition: 0.3s;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .sidebar-close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: transparent;
        border: none;
        font-size: 2rem;
        color: var(--text-secondary);
        cursor: pointer;
        line-height: 1;
        padding: 0;
        width: 30px;
        height: 30px;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .dashboard-main {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-slide {
        height: 250px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    section {
        padding: 2rem 0;
    }

    .auth-card {
        padding: 1.5rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

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