/* ===========================
   Admin Reset & Base
=========================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --admin-primary: #1a1a2e;
    --admin-accent: #d4af37;
    --admin-accent-dark: #b8941f;
    --admin-bg: #f0f2f5;
    --admin-card-bg: #ffffff;
    --admin-text: #333;
    --admin-text-light: #666;
    --admin-text-muted: #999;
    --admin-border: #e0e0e0;
    --admin-success: #28a745;
    --admin-danger: #dc3545;
    --admin-warning: #ffc107;
    --admin-info: #17a2b8;
    --admin-radius: 8px;
    --admin-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --admin-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --admin-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
}

body.admin-body {
    font-family: var(--admin-font);
    background: var(--admin-bg);
    color: var(--admin-text);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===========================
   Admin Login
=========================== */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 20px;
}

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

.admin-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.admin-login-header h1 {
    font-size: 28px;
    font-weight: 900;
    color: var(--admin-primary);
    letter-spacing: 2px;
}

.admin-login-header p {
    font-size: 14px;
    color: var(--admin-text-muted);
    margin-top: 4px;
}

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text);
    margin-bottom: 8px;
}

.admin-form-group label i {
    color: var(--admin-text-muted);
    margin-right: 6px;
}

.admin-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--admin-border);
    border-radius: var(--admin-radius);
    font-family: var(--admin-font);
    font-size: 15px;
    transition: all 0.3s ease;
}

.admin-form-group input:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.admin-btn-login {
    width: 100%;
    padding: 14px;
    background: var(--admin-primary);
    color: #fff;
    border: none;
    border-radius: var(--admin-radius);
    font-family: var(--admin-font);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.admin-btn-login:hover {
    background: #2a2a3e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-login-hint {
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: var(--admin-radius);
    text-align: center;
}

.admin-login-hint p {
    font-size: 13px;
    color: var(--admin-text-muted);
    line-height: 1.8;
}

.admin-back-home {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--admin-text-light);
    transition: color 0.3s ease;
}

.admin-back-home:hover {
    color: var(--admin-accent);
}

/* ===========================
   Admin Alert
=========================== */
.admin-alert {
    padding: 12px 16px;
    border-radius: var(--admin-radius);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-alert-close {
    cursor: pointer;
}

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

/* ===========================
   Admin Sidebar
=========================== */
.admin-sidebar {
    width: 240px;
    background: var(--admin-primary);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.admin-sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header h2 {
    font-size: 20px;
    font-weight: 900;
    color: var(--admin-accent);
    letter-spacing: 2px;
}

.admin-sidebar-header span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.admin-nav {
    flex: 1;
    padding: 16px 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    transition: all 0.2s ease;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.admin-nav-link.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--admin-accent);
    border-right: 3px solid var(--admin-accent);
}

.admin-nav-link i {
    width: 20px;
    text-align: center;
}

.admin-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
}

.admin-logout {
    color: rgba(255, 255, 255, 0.5);
}

.admin-logout:hover {
    color: var(--admin-danger);
    background: rgba(220, 53, 69, 0.1);
}

/* ===========================
   Admin Main
=========================== */
.admin-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--admin-shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--admin-primary);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--admin-text-light);
}

.admin-user i {
    font-size: 20px;
    color: var(--admin-accent);
}

.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--admin-primary);
}

.admin-content {
    padding: 24px;
    flex: 1;
}

/* ===========================
   Dashboard
=========================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.dash-stat-card {
    background: #fff;
    border-radius: var(--admin-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--admin-shadow);
}

.dash-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    color: var(--admin-accent);
    border-radius: 12px;
    font-size: 20px;
}

.dash-icon-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--admin-warning);
}

.dash-icon-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--admin-danger);
}

.dash-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--admin-primary);
    line-height: 1.2;
}

.dash-stat-label {
    font-size: 13px;
    color: var(--admin-text-muted);
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dash-action-card {
    background: #fff;
    border-radius: var(--admin-radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--admin-shadow);
    transition: all 0.3s ease;
    color: var(--admin-text);
}

.dash-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--admin-shadow-md);
    color: var(--admin-accent);
}

.dash-action-card i {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.dash-action-card span {
    font-size: 14px;
    font-weight: 500;
}

/* ===========================
   Admin Toolbar
=========================== */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-filter-select {
    padding: 8px 16px;
    border: 2px solid var(--admin-border);
    border-radius: var(--admin-radius);
    font-family: var(--admin-font);
    font-size: 14px;
    color: var(--admin-text);
    background: #fff;
    cursor: pointer;
}

.admin-filter-select:focus {
    outline: none;
    border-color: var(--admin-accent);
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--admin-radius);
    font-family: var(--admin-font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--admin-primary);
    color: #fff;
}

.admin-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.admin-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.admin-btn-secondary {
    background: #6c757d;
}

.admin-btn-export {
    background: var(--admin-success);
}

.admin-btn-export:hover {
    background: #218838;
}

/* ===========================
   Admin Table
=========================== */
.admin-table-wrap {
    background: #fff;
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.admin-table thead {
    background: var(--admin-primary);
}

.admin-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--admin-border);
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--admin-text);
}

.admin-cell-note {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-empty {
    text-align: center;
    padding: 40px !important;
    color: var(--admin-text-muted);
    font-size: 15px;
}

/* ===========================
   Admin Tags & Status
=========================== */
.admin-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.admin-tag-model {
    background: rgba(212, 175, 55, 0.1);
    color: var(--admin-accent-dark);
}

.admin-tag-posture {
    background: rgba(23, 162, 184, 0.1);
    color: var(--admin-info);
}

.admin-tag-height {
    background: rgba(40, 167, 69, 0.1);
    color: var(--admin-success);
}

.admin-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.admin-status-pending {
    background: #fff3cd;
    color: #856404;
}

.admin-status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.admin-status-completed {
    background: #d4edda;
    color: #155724;
}

.admin-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.admin-status-select {
    padding: 6px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
}

.admin-status-select:focus {
    outline: none;
    border-color: var(--admin-accent);
}

/* ===========================
   Admin Pagination
=========================== */
.admin-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.admin-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: #fff;
    color: var(--admin-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-page-btn:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}

.admin-page-btn.active {
    background: var(--admin-primary);
    color: #fff;
    border-color: var(--admin-primary);
}

.admin-page-ellipsis {
    display: flex;
    align-items: center;
    color: var(--admin-text-muted);
    padding: 0 6px;
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 992px) {
    .dashboard-stats,
    .dashboard-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-menu-toggle {
        display: block;
    }

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

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filter-select {
        width: 100%;
    }
}

/* ===========================
   Notification Badge
=========================== */
.notif-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: var(--admin-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: 6px;
}

#notifNavLink {
    position: relative;
}

/* ===========================
   Admin Form Styles
=========================== */
.admin-form {
    background: var(--admin-card-bg);
    padding: 24px;
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 6px;
}

.required {
    color: var(--admin-danger);
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--admin-font);
    color: var(--admin-text);
    background: #fff;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--admin-accent);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
    font-family: var(--admin-font);
}

.btn-primary {
    background: var(--admin-primary);
    color: #fff;
}

.btn-primary:hover {
    background: #2a2a4e;
}

.btn-secondary {
    background: #e9ecef;
    color: var(--admin-text);
}

.btn-secondary:hover {
    background: #dae0e5;
}

.btn-danger {
    background: var(--admin-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--admin-text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.page-link {
    padding: 8px 16px;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--admin-text);
    font-size: 14px;
}

.page-link:hover {
    background: var(--admin-bg);
}

.page-current {
    font-size: 14px;
    color: var(--admin-text-light);
}

.admin-actions {
    display: flex;
    gap: 12px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-table {
        font-size: 13px;
    }
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
    }
    .admin-filter-form {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .dashboard-actions {
        grid-template-columns: 1fr;
    }
    .admin-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .admin-header h1 {
        font-size: 18px;
    }
    .admin-toolbar {
        flex-direction: column;
    }
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    .admin-pagination {
        flex-wrap: wrap;
    }
    .form-actions {
        flex-direction: column;
    }
}

/* ===========================
   Archive / Posture Tracking Styles
   =========================== */

/* Archive Toolbar */
.archive-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.archive-toolbar .search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.archive-toolbar .search-form input {
    width: 240px;
    padding: 8px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 14px;
}

.archive-count {
    font-size: 14px;
    color: var(--admin-text-muted);
}

/* Archive Cards Grid */
.archive-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.archive-card {
    background: var(--admin-card-bg);
    border-radius: var(--admin-radius);
    padding: 20px;
    border: 1px solid var(--admin-border);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.archive-card:hover {
    box-shadow: var(--admin-shadow-md);
    transform: translateY(-2px);
    border-color: var(--admin-accent);
}

.archive-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.archive-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

.archive-card-phone {
    font-size: 13px;
    color: var(--admin-text-muted);
    margin-top: 4px;
}

.archive-card-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-border);
}

.archive-card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--admin-text-light);
}

.archive-card-meta-item i {
    color: var(--admin-accent);
    font-size: 14px;
}

/* Archive Detail Card */
.archive-detail-card {
    background: var(--admin-card-bg);
    border-radius: var(--admin-radius);
    padding: 24px;
    border: 1px solid var(--admin-border);
    margin-bottom: 20px;
}

.archive-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--admin-border);
}

.archive-detail-header h3 {
    font-size: 20px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-detail-header .age-tag {
    font-size: 14px;
    color: var(--admin-text-muted);
    font-weight: 400;
}

.archive-detail-meta {
    color: var(--admin-text-muted);
    font-size: 14px;
    margin: 0;
}

/* Section Cards */
.archive-section-card {
    background: var(--admin-card-bg);
    border-radius: var(--admin-radius);
    padding: 20px;
    border: 1px solid var(--admin-border);
    margin-bottom: 16px;
}

.archive-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-section-title i {
    color: var(--admin-accent);
}

/* VIP Section */
.vip-section-card {
    background: linear-gradient(135deg, #1a1a2e, #2c2c54);
    border-radius: var(--admin-radius);
    padding: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 16px;
}

.vip-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #d4af37;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vip-section-title i {
    color: #d4af37;
}

.vip-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.vip-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    font-family: var(--admin-font);
    font-size: 14px;
    resize: vertical;
}

.vip-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Milestones */
.milestone-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.milestone-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
}

.milestone-badge i {
    font-size: 14px;
}

.milestone-delete {
    color: #dc3545;
    margin-left: 4px;
    font-size: 12px;
    text-decoration: none;
}

.milestone-delete:hover {
    color: #a71d2a;
}

.milestone-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    padding: 8px 0;
}

/* Milestone Form */
.milestone-form {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 16px;
}

.milestone-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.milestone-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.milestone-form-input {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
}

.milestone-form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Record Table */
.record-table-section {
    margin-top: 16px;
}

.record-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.record-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
}

/* Photo Upload Grid */
.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.photo-upload-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.photo-upload-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--admin-text);
}

/* Modal Unified */
.archive-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.archive-modal.show {
    display: block;
}

.archive-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.archive-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 480px;
    margin: 80px auto;
    padding: 24px;
    z-index: 1001;
    max-height: 85vh;
    overflow-y: auto;
}

.archive-modal-content.wide {
    max-width: 700px;
}

.archive-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.archive-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--admin-text);
}

.archive-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Child Grid in Parent Detail */
.child-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.child-card {
    background: var(--admin-card-bg);
    border-radius: var(--admin-radius);
    padding: 16px;
    border: 1px solid var(--admin-border);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.child-card:hover {
    box-shadow: var(--admin-shadow-md);
    border-color: var(--admin-accent);
    transform: translateY(-2px);
}

.child-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.child-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
}

.child-avatar i {
    font-size: 18px;
    color: var(--admin-accent);
}

.child-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--admin-text);
}

.child-info span {
    font-size: 12px;
    color: var(--admin-text-muted);
}

.child-card-meta {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--admin-border);
    font-size: 12px;
    color: var(--admin-text-light);
}

.child-card-meta i {
    color: var(--admin-accent);
    margin-right: 4px;
}

/* VIP Badge */
.vip-badge-inline {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-left: 8px;
}

.vip-badge-inline.vip {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #fff;
}

.vip-badge-inline.svip {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

/* Archive Responsive */
@media (max-width: 768px) {
    .archive-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .archive-toolbar .search-form input {
        width: 100%;
    }
    .archive-cards {
        grid-template-columns: 1fr;
    }
    .child-grid {
        grid-template-columns: 1fr;
    }
    .milestone-form-grid {
        grid-template-columns: 1fr;
    }
    .photo-upload-grid {
        grid-template-columns: 1fr;
    }
    .vip-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .archive-modal-content {
        margin: 40px 16px;
        max-height: 80vh;
    }
    .archive-detail-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* ===========================
   New Design System - Archive & Modern Admin
   =========================== */

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-hover: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --accent: #d4af37;
  --accent-hover: #b8941f;
  --accent-bg: #fef3c7;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --transition: all 0.2s ease;
}

/* Layout */
.container-fluid {
  padding: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: -16px;
  margin-bottom: 20px;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--surface-hover);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stats Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.gold { background: #fef3c7; color: #d4af37; }
.stat-icon.blue { background: #dbeafe; color: #3b82f6; }
.stat-icon.green { background: #d1fae5; color: #10b981; }
.stat-icon.purple { background: #ede9fe; color: #8b5cf6; }
.stat-icon.red { background: #fee2e2; color: #ef4444; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Info Cards (for profiles) */
.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.info-card:hover {
  box-shadow: var(--shadow-md);
}

.info-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.info-avatar.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.info-avatar.green { background: linear-gradient(135deg, #10b981, #059669); }
.info-avatar.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.info-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2px;
}

.info-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input {
  width: 240px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--admin-font);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

/* Modern Table */
.data-table-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--surface-hover);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-accent { background: #fef3c7; color: #92400e; }

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: var(--admin-font);
}

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }

.btn-icon { padding: 8px; }

/* Forms */
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--admin-font);
  color: var(--text-primary);
  background: var(--surface);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

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

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Milestones */
.milestone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.milestone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
}

.milestone-chip i {
  font-size: 14px;
}

.milestone-chip .delete {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
  cursor: pointer;
}

.milestone-chip .delete:hover {
  color: var(--danger);
}

/* VIP Section */
.vip-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid #fbbf24;
  margin-bottom: 20px;
}

.vip-banner-title {
  font-size: 15px;
  font-weight: 600;
  color: #92400e;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vip-banner-title i {
  color: #d4af37;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: var(--border);
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* Detail Page Header */
.detail-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.detail-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.detail-hero-avatar.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.detail-hero-avatar.green { background: linear-gradient(135deg, #10b981, #059669); }
.detail-hero-avatar.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.detail-hero-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.detail-hero-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 4px;
}

.detail-hero-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Modal (modern) */
.modal-overlay-modern {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay-modern.show {
  display: flex;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlideIn 0.2s ease;
}

.modal-box.wide { max-width: 700px; }

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-box-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.modal-box-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-box-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.modal-box-body {
  padding: 24px;
}

.modal-box-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--surface-hover);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Pagination */
.pagination-modern {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 16px;
}

.pagination-modern a,
.pagination-modern span {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: var(--transition);
}

.pagination-modern a:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.pagination-modern .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination-modern .disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Photo preview */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.photo-preview-item {
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-item.empty {
  color: var(--text-muted);
  font-size: 13px;
}

/* Record detail page */
.record-detail-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 28px;
}

.record-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.record-detail-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.record-detail-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.record-detail-stat {
  background: var(--surface-hover);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
  border: 1px solid var(--border);
}

.record-detail-stat .stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.record-detail-stat .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.record-detail-stat .stat-value small {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.record-detail-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.record-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.record-detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tag-list-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-modern {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(212,175,55,0.1);
  color: var(--accent);
  border: 1px solid rgba(212,175,55,0.2);
}

.health-grid-modern {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.health-item-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-hover);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.health-label-modern {
  font-size: 12px;
  color: var(--text-secondary);
}

.health-value-modern {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.health-value-normal { color: #065f46; background: #d1fae5; }
.health-value-mild { color: #92400e; background: #fef3c7; }
.health-value-moderate { color: #1e40af; background: #dbeafe; }
.health-value-severe { color: #991b1b; background: #fee2e2; }

.detail-note-modern {
  background: var(--surface-hover);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid var(--border);
}

.photos-grid-modern {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.photo-box-modern {
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-label-modern {
  display: block;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--border-light);
  border-bottom: 1px solid var(--border);
}

.photo-box-modern img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.photo-placeholder-modern {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Eval checkboxes in modal */
.eval-group-modern {
  margin: 16px 0;
}

.eval-label-modern {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
  color: var(--text-primary);
}

.eval-checkboxes-modern {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.eval-checkboxes-modern label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-primary);
}

.health-items-modern {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.health-item-row span {
  font-size: 13px;
  color: var(--text-secondary);
}

.health-item-row select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--admin-font);
  color: var(--text-primary);
  background: var(--surface);
}

/* Photo upload in modal */
.photo-upload-grid-modern {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.photo-upload-item-modern {
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border);
}

.photo-upload-item-modern label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.photo-upload-item-modern input[type="file"] {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Comment section */
.comment-section {
  margin-top: 16px;
}

.comment-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.comment-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--admin-font);
  color: var(--text-primary);
  background: var(--surface);
  resize: vertical;
  min-height: 80px;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

/* Milestone form inline */
.milestone-form-inline {
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border);
}

.milestone-form-row-modern {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.milestone-form-input-modern {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--admin-font);
  color: var(--text-primary);
  background: var(--surface);
}

.milestone-form-input-modern:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .photo-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-input { width: 100%; }
  .detail-hero { flex-direction: column; text-align: center; }
  .health-grid-modern { grid-template-columns: repeat(2, 1fr); }
  .photos-grid-modern { grid-template-columns: repeat(2, 1fr); }
  .photo-upload-grid-modern { grid-template-columns: 1fr; }
  .eval-checkboxes-modern { grid-template-columns: 1fr; }
  .record-detail-stats { flex-wrap: wrap; }
  .milestone-form-row-modern { flex-direction: column; align-items: stretch; }
}

