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

:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-hover: #4caf50;
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1a1a1a;
    --text-sub: #666666;
    --border-light: #f0f0f0;
    --br-card: 20px;
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.03);
    --nav-height: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Prompt', sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Layout & Responsiveness --- */

.main-header {
    height: var(--nav-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.1);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
}

.logo-text .text-grey {
    color: #4b5563;
}

.logo-text .text-green {
    color: #2e7d32;
    margin-left: 2px;
}

.nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    list-style: none;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.nav-links.active {
    display: flex;
}

.nav-links li {
    margin-bottom: 15px;
}

.mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        padding: 0;
        box-shadow: none;
        gap: 30px;
    }

    .nav-links li {
        margin-bottom: 0;
    }

    .mobile-only {
        display: none;
    }
}

.nav-links a {
    font-weight: 500;
    color: var(--text-sub);
    transition: 0.3s;
    font-size: 1rem;
}

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

.menu-toggle {
    display: block;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 5px;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
    backdrop-filter: blur(2px);
}

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

.user-profile {
    display: none;
    /* Hide on small screens to save space, or move into menu */
    align-items: center;
    gap: 12px;
}

@media (min-width: 1024px) {
    .user-profile {
        display: flex;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 8px 80px;
    /* Reduced from 12px for mobile */
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #064e3b;
    margin: 10px 0 25px;
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .header-container {
        padding: 0 24px;
    }

    .container {
        margin: 30px auto;
        padding: 0 24px 100px;
    }
}

/* --- Components --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(46, 125, 50, 0.05);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.badge-ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge-warn {
    background: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.badge-danger {
    background: #fdf2f2;
    color: #d32f2f;
    border: 1px solid #fecaca;
}

.card {
    background: var(--bg-card);
    border-radius: var(--br-card);
    box-shadow: var(--shadow);
    padding: 12px;
    /* Reduced from 16px for mobile */
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .card {
        padding: 24px;
        margin-bottom: 24px;
    }
}

.grid-2 {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.hidden-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }
}

.customer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .customer-list {
        gap: 16px;
    }
}

.customer-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: #fcfdfd;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: 0.2s;
}

/* Bottom Navigation for Mobile */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #f1f5f9;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 4px;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    flex: 1;
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.bottom-nav-item.active {
    color: var(--primary);
}

@media (max-width: 767px) {
    .bottom-nav {
        display: flex;
    }

    /* Add padding to body to prevent content from being hidden behind bottom nav */
    body {
        padding-bottom: 70px;
    }
}

/* Appointment Specific Responsive Styles */
.appointment-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .appointment-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
    }
}

.appointment-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1024px) {
    .appointment-layout {
        display: grid;
        grid-template-columns: 380px 1fr;
        gap: 30px;
        align-items: start;
    }
}

.booking-modal-content {
    width: 95%;
    max-width: 500px;
    padding: 24px;
    background: white;
    border-radius: 24px;
}

@media (min-width: 768px) {
    .booking-modal-content {
        padding: 40px;
    }
}

.modal-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .modal-grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Profile Specific Responsive Styles */
.profile-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .profile-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
    }
}

.status-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    margin-bottom: 25px;
}

@media (min-width: 600px) {
    .status-bar {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 15px 25px;
    }
}

.marker-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .marker-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 480px) {
    .action-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.data-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
}

@media (min-width: 600px) {
    .data-summary-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 15px;
    }
}

.ai-analysis-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .ai-analysis-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.status-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    margin-top: 10px;
}

@media (min-width: 600px) {
    .status-group {
        justify-content: flex-end;
        width: auto;
        margin-top: 0;
        gap: 20px;
    }
}

@media (min-width: 600px) {
    .customer-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
    }
}

.customer-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 768px) {
    .info-group {
        gap: 16px;
    }
}

.search-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .search-bar {
        flex-direction: row;
        margin-bottom: 24px;
    }
}

.search-bar input {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    width: 100%;
    font-size: 0.95rem;
}

@media (min-width: 600px) {
    .search-bar input {
        flex: 1;
    }
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Kanban Styles */
.kanban-board {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.kanban-col {
    min-width: 290px;
    max-width: 320px;
    background: #eaeff2;
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .kanban-col {
        min-width: 300px;
        padding: 16px;
    }
}

.kanban-col h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--text-sub);
}

/* Kanban Specific Responsive Styles */
.kanban-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .kanban-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        margin-bottom: 30px;
    }
}

.strategy-guide {
    background: linear-gradient(135deg, #f0f4f1 0%, #ffffff 100%);
    border: none;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 5px solid var(--primary);
    padding: 15px;
}

@media (min-width: 768px) {
    .strategy-guide {
        gap: 20px;
        margin-bottom: 30px;
        padding: 24px;
    }
}

.kanban-card {
    padding: 16px;
    margin: 0;
    background: #fff;
    border-radius: 15px;
    position: relative;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: 0.3s;
}

.kanban-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.card-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.8rem;
    color: #636e72;
    margin-bottom: 15px;
}

.modal-content {
    width: 95%;
    max-width: 450px;
    padding: 20px;
    background: white;
    border-radius: var(--br-card);
}

@media (min-width: 768px) {
    .modal-content {
        padding: 30px;
    }
}