/* ====================================================
   Agenda MarcoSantoFoto — Custom Styles
   Complementa o Bootstrap 5
   ==================================================== */

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

:root {
    --primary:        #6366f1;
    --primary-dark:   #4f46e5;
    --primary-light:  #a5b4fc;
    --secondary:      #f59e0b;
    --success:        #10b981;
    --danger:         #ef4444;
    --dark:           #0f172a;
    --dark-card:      #1e293b;
    --dark-border:    #334155;
    --text-muted:     #94a3b8;
    --sidebar-width:  260px;
}

/* ---- Global ---------------------------------------- */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
}

/* ---- Admin Layout ---------------------------------- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark) 0%, #1a1f3a 100%);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform .3s ease;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.sidebar-brand .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    font-size: .85rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.2;
}

.sidebar-brand .brand-sub {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }

.sidebar-section-label {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: .75rem 1.25rem .25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1.25rem;
    color: #94a3b8;
    font-size: .875rem;
    font-weight: 500;
    border-radius: 0;
    transition: all .2s ease;
    text-decoration: none;
    position: relative;
}

.sidebar-nav .nav-link i { font-size: 1.1rem; width: 20px; flex-shrink: 0; }

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(99, 102, 241, .15);
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--dark-border);
    font-size: .8rem;
    color: var(--text-muted);
}

/* Main content */
.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: .875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 1rem;
}

.admin-topbar .page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.admin-content { padding: 1.5rem; flex: 1; }

/* ---- Cards ----------------------------------------- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    overflow: hidden;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    font-size: .9rem;
    padding: 1rem 1.25rem;
}

/* Stat cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: rgba(99,102,241,.12); color: var(--primary); }
.stat-icon.success { background: rgba(16,185,129,.12); color: var(--success); }
.stat-icon.warning { background: rgba(245,158,11,.12); color: var(--secondary); }
.stat-icon.danger  { background: rgba(239,68,68,.12);  color: var(--danger); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
}

.stat-label {
    font-size: .8rem;
    color: #64748b;
    margin-top: .15rem;
}

/* ---- Badges / Status pills ------------------------ */
.badge-available  { background: rgba(16,185,129,.12);  color: #059669; }
.badge-booked     { background: rgba(99,102,241,.12);  color: var(--primary-dark); }
.badge-blocked    { background: rgba(100,116,139,.12); color: #475569; }
.badge-interested { background: rgba(245,158,11,.12);  color: #d97706; }
.badge-confirmed  { background: rgba(16,185,129,.12);  color: #059669; }
.badge-cancelled  { background: rgba(239,68,68,.12);   color: var(--danger); }
.badge-pending    { background: rgba(245,158,11,.12);  color: #d97706; }

/* ---- Tables --------------------------------------- */
.table { font-size: .875rem; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; font-weight: 600; }
.table td, .table th { padding: .85rem 1rem; }
.table tbody tr:hover { background: #f8fafc; }

/* ---- Buttons -------------------------------------- */
.btn { font-weight: 500; border-radius: 8px; font-size: .875rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { font-size: .8rem; padding: .3rem .7rem; }

/* ---- Forms ---------------------------------------- */
.form-label { font-weight: 500; font-size: .875rem; color: #374151; margin-bottom: .4rem; }
.form-control, .form-select {
    border-radius: 8px;
    border-color: #e2e8f0;
    font-size: .875rem;
    padding: .55rem .85rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

/* Color dot for session types */
.color-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

/* ---- Calendar grid -------------------------------- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-size: .75rem;
    font-weight: 600;
    color: #64748b;
    padding: .5rem 0;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.calendar-day {
    min-height: 90px;
    background: #fff;
    border-radius: 8px;
    padding: .5rem;
    border: 1.5px solid #f1f5f9;
    transition: border-color .2s;
    font-size: .8rem;
}

.calendar-day:hover { border-color: var(--primary-light); }
.calendar-day.today { border-color: var(--primary); }
.calendar-day.other-month { background: #f8fafc; opacity: .6; }
.calendar-day-number { font-weight: 600; color: #374151; margin-bottom: .35rem; font-size: .85rem; }
.calendar-day.today .calendar-day-number { color: var(--primary); }

.slot-chip {
    display: block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 500;
    margin-bottom: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slot-chip:hover { opacity: .85; text-decoration: none; }

/* ---- Client / Public layout ---------------------- */
.client-hero {
    background: linear-gradient(135deg, var(--dark) 0%, #1e1b4b 100%);
    color: #fff;
    padding: 3rem 0 2rem;
    text-align: center;
}

.client-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.client-hero .subtitle {
    color: var(--primary-light);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.slot-card {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #f1f5f9;
    padding: 1.25rem;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.slot-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99,102,241,.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.slot-card .slot-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.slot-card .slot-type {
    font-size: .85rem;
    color: #64748b;
}

.slot-card .slot-badge {
    font-size: .75rem;
    padding: .3rem .7rem;
    border-radius: 20px;
}

/* ---- Month nav ------------------------------------ */
.month-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.month-nav .month-label {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

/* ---- Alerts --------------------------------------- */
.alert { border-radius: 10px; border: none; font-size: .875rem; }
.alert-success { background: rgba(16,185,129,.1); color: #065f46; }
.alert-danger   { background: rgba(239,68,68,.1);  color: #991b1b; }
.alert-warning  { background: rgba(245,158,11,.1); color: #92400e; }
.alert-info     { background: rgba(99,102,241,.1); color: #312e81; }

/* ---- Responsive ----------------------------------- */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .calendar-grid { grid-template-columns: repeat(7, 1fr); font-size: .7rem; }
    .calendar-day { min-height: 60px; padding: .25rem; }
}
