:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1a2e1a;
    --sidebar-text: #c8d8c8;
    --sidebar-active: #2d6a2d;
    --sidebar-hover: #243824;
    --top-navbar-bg: #fff;
    --accent: #28a745;
    --accent-dark: #1e7e34;
    --body-bg: #f4f7f4;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: #333;
    margin: 0;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 18px 20px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
}

.sidebar .nav-section {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(200,216,200,0.45);
    padding: 16px 20px 4px;
    text-transform: uppercase;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 9px 16px;
    border-radius: 8px;
    margin: 1px 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
}

.sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.top-navbar {
    background: var(--top-navbar-bg);
    border-bottom: 1px solid #e8ede8;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.page-content { min-height: calc(100vh - 64px); }

/* Avatar */
.avatar-circle {
    width: 32px; height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 14px;
    padding: 22px 24px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card { border: none; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.card-header { border-radius: 14px 14px 0 0 !important; border-bottom: 1px solid rgba(0,0,0,0.06); background: #fff; font-weight: 600; }

/* Tables */
.table { font-size: 0.875rem; }
.table th { font-weight: 600; color: #666; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-hover tbody tr:hover { background: #f8fff8; }

/* Forms */
.form-label { font-weight: 500; font-size: 0.875rem; color: #555; }
.form-control, .form-select {
    border: 1.5px solid #dce5dc;
    border-radius: 8px;
    font-size: 0.875rem;
    padding: 8px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(40,167,69,0.15);
}

/* Buttons */
.btn { border-radius: 8px; font-weight: 500; font-size: 0.875rem; }
.btn-success { background: var(--accent); border-color: var(--accent); }
.btn-success:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* Badges */
.badge { font-weight: 500; font-size: 0.75rem; border-radius: 6px; }

/* Alerts */
.alert { border: none; border-radius: 10px; font-size: 0.875rem; }

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.page-header h4 { margin: 0; font-weight: 700; color: #222; }

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a2e1a 0%, #2d6a2d 50%, #1a2e1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 20px;
}

/* Sidebar collapsed */
.sidebar-collapsed .sidebar { transform: translateX(-100%); }
.sidebar-collapsed .main-content { margin-left: 0; }

/* Animal photo */
.animal-photo {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #e8ede8;
}
.animal-photo-lg {
    width: 160px; height: 160px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid #e8ede8;
}

/* Reminder badge */
.reminder-badge {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
    .sidebar.show { transform: translateX(0); }
    .login-card { margin: 16px; padding: 32px 24px; }
}
