/* Vacher Sketches — custom styles */

:root {
    --vs-green:       #1c4532;
    --vs-green-mid:   #276749;
    --vs-green-light: #d1fae5;
    --vs-sidebar-w:   230px;
}

/* ── Layout ───────────────────────────────────────────────── */
body {
    background-color: #f4f6f4;
    font-size: 0.925rem;
}

#wrapper {
    min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
#sidebar {
    width: var(--vs-sidebar-w);
    min-width: var(--vs-sidebar-w);
    min-height: 100vh;
    background-color: var(--vs-green);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h5 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

#sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.12);
    color: #ffffff;
}

#sidebar .nav-link i {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

.sidebar-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    padding: 1rem 1rem 0.25rem;
}

/* ── Top bar ──────────────────────────────────────────────── */
#topbar {
    height: 54px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

#topbar .page-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

#topbar .user-info {
    font-size: 0.85rem;
    color: #6b7280;
}

/* ── Main content ─────────────────────────────────────────── */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.content-area {
    padding: 1.75rem 2rem;
    flex: 1;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

/* ── Tables ───────────────────────────────────────────────── */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background-color: #f9fafb;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge-active     { background-color: var(--vs-green-light); color: var(--vs-green); }
.badge-inactive   { background-color: #fef2f2; color: #991b1b; }
.badge-admin      { background-color: #eff6ff; color: #1d4ed8; }
.badge-gardener   { background-color: var(--vs-green-light); color: var(--vs-green); }

/* ── Flash messages ───────────────────────────────────────── */
.alert {
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ── Login page ───────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--vs-green) 0%, var(--vs-green-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 14px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.login-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--vs-green);
}

/* ── Mobile offcanvas nav ─────────────────────────────────── */
.mobile-nav-header {
    background-color: var(--vs-green);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-body {
    background-color: var(--vs-green);
    display: flex;
    flex-direction: column;
}

.mobile-nav-link {
    color: rgba(255,255,255,0.75) !important;
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    min-height: 44px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

/* ── Gardener bottom tab bar ──────────────────────────────── */
.bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background-color: var(--vs-green);
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.15);
    z-index: 1030;
}

.bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    gap: 3px;
    min-height: 58px;
    transition: color 0.15s;
}

.bottom-tab:hover,
.bottom-tab.active {
    color: #ffffff;
}

.bottom-tab i {
    font-size: 1.35rem;
    line-height: 1;
}

/* ── Mobile layout adjustments ────────────────────────────── */
@media (max-width: 991.98px) {
    .content-area {
        padding: 1rem 1rem 72px;
    }

    /* Ensure action buttons meet 44px minimum touch target */
    .btn-sm {
        min-height: 44px;
        min-width: 44px;
    }

    /* Weekly availability time inputs — full size on mobile */
    .avail-row .form-control-sm {
        min-height: 44px;
        font-size: 1rem;
    }
}

/* ── Availability grid ────────────────────────────────────── */
.avail-row {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}

.avail-row:last-child {
    border-bottom: none;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-vs {
    background-color: var(--vs-green);
    color: #ffffff;
    border: none;
}

.btn-vs:hover {
    background-color: var(--vs-green-mid);
    color: #ffffff;
}
