/* =============================================
   VET PORTAL STYLES
   ============================================= */

/* Logo Badge */
.logo-badge {
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
    color: var(--light);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Auth Section */
.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 1rem 60px;
}

.auth-card {
    background: var(--dark-card);
    border-radius: var(--radius-xl);
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

body.light-mode .auth-card {
    background: var(--light);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--light);
}

.auth-header h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--dark-lighter);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}

body.light-mode .auth-tabs {
    background: var(--light-gray);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: var(--primary);
    color: var(--light);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon i:first-child {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-icon input,
.input-icon select {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--dark-lighter);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

body.light-mode .input-icon input,
body.light-mode .input-icon select {
    background: var(--light-gray);
}

.input-icon input:focus,
.input-icon select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--dark-card);
}

body.light-mode .input-icon input:focus,
body.light-mode .input-icon select:focus {
    background: var(--light);
}

.input-icon input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary);
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-options a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.form-options a:hover {
    color: var(--primary-light);
}

.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--light);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 216, 203, 0.3);
}

.auth-error {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.9rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--dark-card);
    border: 1px solid rgba(100, 216, 203, 0.3);
    border-radius: var(--radius-lg);
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

body.light-mode .user-toggle {
    background: var(--light);
}

.user-toggle:hover {
    border-color: var(--accent);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 0.9rem;
}

.user-options {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--dark-card);
    border: 1px solid rgba(100, 216, 203, 0.2);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
}

body.light-mode .user-options {
    background: var(--light);
}

.user-options.show {
    display: block;
}

.user-options button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.user-options button:hover {
    background: rgba(100, 216, 203, 0.1);
    color: var(--accent);
}

.user-options button i {
    width: 18px;
    color: var(--text-muted);
}

.user-options button:hover i {
    color: var(--accent);
}

.user-divider {
    height: 1px;
    background: rgba(100, 216, 203, 0.1);
    margin: 0.5rem 0;
}

.logout-btn:hover {
    color: var(--danger) !important;
}

.logout-btn:hover i {
    color: var(--danger) !important;
}

/* Dashboard Section */
.dashboard-section {
    display: flex;
    gap: 2rem;
    padding: 100px 0 60px;
    min-height: 100vh;
    padding-left: 280px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(calc(-50% - 280px));
    height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 100;
}

@media (min-width: 1400px) {
    .sidebar {
        left: calc((100vw - 1320px) / 2);
        transform: none;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        left: 20px;
        transform: none;
    }
}

.sidebar-nav {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Sidebar Profile Card */
.sidebar-profile-card {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

body.light-mode .sidebar-profile-card {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.sidebar-profile-photo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--light);
    margin: 0 auto 0.75rem;
    overflow: hidden;
}

.sidebar-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-profile-info {
    margin-bottom: 1rem;
}

.sidebar-profile-name {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.sidebar-profile-email {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
    word-break: break-all;
}

.sidebar-profile-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 216, 203, 0.15);
}

.sidebar-stat {
    text-align: center;
}

.sidebar-stat-value {
    display: block;
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

body.light-mode .sidebar-nav {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.nav-item i {
    width: 20px;
    font-size: 1rem;
}

.nav-item:hover {
    background: rgba(100, 216, 203, 0.1);
    color: var(--accent);
}

.nav-item.active {
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
    color: var(--light);
}

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: var(--light);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.3);
}

/* Dashboard Main */
.dashboard-main {
    flex: 1;
    min-width: 0;
}

.dashboard-panel {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.panel-header h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.welcome-message {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

body.light-mode .stat-card {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--light);
}

.stat-appointments .stat-icon {
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
}

.stat-patients .stat-icon {
    background: linear-gradient(135deg, #8170CF 0%, #6A59B8 100%);
}

.stat-pending .stat-icon {
    background: linear-gradient(135deg, #FFB85C 0%, #FF9F43 100%);
}

.stat-completed .stat-icon {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

/* Dashboard Card */
.dashboard-card {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

body.light-mode .dashboard-card {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary);
}

/* Appointments List */
.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark-lighter);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

body.light-mode .appointment-item {
    background: var(--light-gray);
}

.appointment-item:hover {
    background: rgba(100, 216, 203, 0.1);
}

.appointment-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.5rem;
    background: var(--primary);
    border-radius: var(--radius-sm);
    color: var(--light);
    font-weight: 600;
}

.appointment-time .time {
    font-size: 1rem;
}

.appointment-time .period {
    font-size: 0.7rem;
    opacity: 0.8;
}

.appointment-info {
    flex: 1;
}

.appointment-info h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.appointment-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.appointment-status {
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(255, 184, 92, 0.15);
    color: #FFB85C;
}

.status-confirmed {
    background: rgba(100, 216, 203, 0.15);
    color: #64D8CB;
}

.status-completed {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.status-cancelled {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

/* Profile Alert */
.profile-alert {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 184, 92, 0.1) 0%, rgba(255, 159, 67, 0.05) 100%);
    border-left: 4px solid #FFB85C;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
}

.alert-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 184, 92, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFB85C;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.btn-alert {
    padding: 0.75rem 1.5rem;
    background: #FFB85C;
    border: none;
    border-radius: var(--radius-md);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-alert:hover {
    background: #FF9F43;
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #64D8CB 0%, #4FC3B6 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--light);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 216, 203, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--text-muted);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-input,
.filter-select {
    padding: 0.75rem 1rem;
    background: var(--dark-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

body.light-mode .filter-input,
body.light-mode .filter-select {
    background: var(--light);
    border-color: var(--light-gray);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filter-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--dark-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

body.light-mode .filter-search input {
    background: var(--light);
    border-color: var(--light-gray);
}

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

/* Data Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

body.light-mode .data-table {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(100, 216, 203, 0.1);
}

.data-table th {
    background: rgba(100, 216, 203, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.data-table tr:hover td {
    background: rgba(100, 216, 203, 0.05);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 216, 203, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--accent);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--accent);
    color: var(--light);
}

.btn-icon.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.btn-icon.btn-danger:hover {
    background: #e74c3c;
    color: var(--light);
}

/* Patients Grid */
/* Records List */
.records-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.record-card {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: var(--transition);
}

body.light-mode .record-card {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

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

.record-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.75rem;
    background: var(--primary);
    border-radius: var(--radius-md);
    color: var(--light);
    text-align: center;
}

.record-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.record-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.record-content {
    flex: 1;
}

.record-content h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.record-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.25rem 0;
    line-height: 1.5;
}

.record-diagnosis {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(100, 216, 203, 0.15);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
}

.record-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Profile Form - Full Width */
.profile-form-full {
    width: 100%;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

body.light-mode .profile-tabs {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.profile-tab:hover {
    color: var(--text-primary);
    background: rgba(100, 216, 203, 0.1);
}

.profile-tab.active {
    background: var(--primary);
    color: var(--light);
}

.profile-tab i {
    font-size: 1rem;
}

/* Profile Tab Content */
.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Location Search */
.form-group:has(.location-search-wrapper) {
    position: relative;
}

.location-search-wrapper {
    display: flex;
    gap: 0.5rem;
}

.location-search-wrapper input {
    flex: 1;
}

.btn-locate {
    padding: 0.75rem 1rem;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--light);
    cursor: pointer;
    transition: var(--transition);
}

.btn-locate:hover {
    background: var(--accent);
    transform: scale(1.05);
}

/* Address Suggestions */
.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

body.light-mode .address-suggestions {
    background: var(--light);
}

.address-suggestions.show {
    display: block;
}

.address-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(100, 216, 203, 0.1);
    transition: var(--transition);
}

.address-suggestion:hover {
    background: rgba(100, 216, 203, 0.1);
}

.address-suggestion:last-child {
    border-bottom: none;
}

/* Specialties Grid - No wrap */
.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-grid .checkbox-label {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Profile Map */
.location-map-container {
    margin: 1rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid rgba(100, 216, 203, 0.2);
    position: relative;
    z-index: 1;
}

.profile-map {
    height: 300px;
    width: 100%;
    background: #1a1a2e;
}

/* Custom Map Marker */
.custom-map-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 42px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.marker-pin i {
    font-size: 2.5rem;
    color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Leaflet overrides for dark theme */
.leaflet-control-attribution {
    background: rgba(26, 26, 46, 0.8) !important;
    color: var(--text-muted) !important;
    font-size: 10px;
}

.leaflet-control-attribution a {
    color: var(--accent) !important;
}

.leaflet-control-zoom a {
    background: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border-color: rgba(100, 216, 203, 0.2) !important;
}

.leaflet-control-zoom a:hover {
    background: var(--primary) !important;
    color: var(--light) !important;
}

body.light-mode .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--text-secondary) !important;
}

body.light-mode .leaflet-control-zoom a {
    background: var(--light) !important;
    color: var(--dark) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .leaflet-control-zoom a:hover {
    background: var(--primary) !important;
    color: var(--light) !important;
}

/* Location Details */
.location-details {
    margin-top: 1rem;
}

.location-details .form-group input {
    background: rgba(100, 216, 203, 0.05);
}

/* Dynamic Contact Fields */
.dynamic-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 44px;
    gap: 0.75rem;
    align-items: end;
    padding: 1rem;
    background: rgba(100, 216, 203, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(100, 216, 203, 0.1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-row .form-group {
    margin-bottom: 0;
}

.input-with-type {
    display: flex;
    gap: 0.5rem;
}

.input-with-type select {
    width: 140px;
    flex-shrink: 0;
}

.input-with-type input {
    flex: 1;
}

.btn-remove-contact {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #ef4444;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-remove-contact:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.btn-add-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.75rem;
}

.btn-add-contact:hover {
    background: rgba(100, 216, 203, 0.1);
    border-style: solid;
}

/* Confirm Delete Modal */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.confirm-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: var(--transition);
}

.confirm-modal-overlay.show .confirm-modal {
    transform: scale(1);
}

body.light-mode .confirm-modal {
    background: var(--light);
    box-shadow: var(--shadow-lg);
}

.confirm-modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.confirm-modal-icon i {
    font-size: 1.5rem;
    color: #ef4444;
}

.confirm-modal h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.confirm-modal p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.btn-confirm-cancel {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-confirm-delete {
    padding: 0.75rem 1.5rem;
    background: #ef4444;
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm-delete:hover {
    background: #dc2626;
}

/* Working Hours Icons Fix */
.working-hours-grid .hours-row i {
    color: var(--text-muted);
}

body.light-mode .working-hours-grid .hours-row i {
    color: var(--text-secondary);
}

/* Form Help Text */
.form-help {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Remove old profile form styles */
.profile-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.profile-sidebar {
    display: none;
}

.profile-photo-section {
    display: none;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

body.light-mode .form-section {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.form-section h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
}

.form-section .form-group {
    margin-bottom: 1.25rem;
}

.form-section .form-group:last-child {
    margin-bottom: 0;
}

.form-section input,
.form-section select,
.form-section textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-lighter);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

body.light-mode .form-section input,
body.light-mode .form-section select,
body.light-mode .form-section textarea {
    background: var(--light-gray);
}

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

.form-section input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.checkbox-grid .checkbox-label {
    padding: 0.5rem 0.75rem;
    background: var(--dark-lighter);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

body.light-mode .checkbox-grid .checkbox-label {
    background: var(--light-gray);
}

.checkbox-grid .checkbox-label:hover {
    background: rgba(100, 216, 203, 0.1);
}

.working-hours-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hours-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
}

.hours-row span {
    color: var(--text-secondary);
    font-weight: 500;
}

.hours-row input[type="time"] {
    padding: 0.5rem 0.75rem;
    color-scheme: dark;
}

body.light-mode .hours-row input[type="time"] {
    color-scheme: light;
}

/* Fix time input icon color for dark mode */
.hours-row input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}

body.light-mode .hours-row input[type="time"]::-webkit-calendar-picker-indicator {
    filter: none;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn-save {
    padding: 1rem 2rem;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid #27ae60;
    border-radius: var(--radius-sm);
    color: #27ae60;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.95rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--dark-card);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

body.light-mode .modal-content {
    background: var(--light);
}

.modal-lg {
    max-width: 600px;
}

.modal-xl {
    max-width: 800px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(100, 216, 203, 0.1);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 216, 203, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: var(--light);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .form-group {
    margin-bottom: 1.25rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-lighter);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

body.light-mode .modal-body input,
body.light-mode .modal-body select,
body.light-mode .modal-body textarea {
    background: var(--light-gray);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-section-title {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(100, 216, 203, 0.2);
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(100, 216, 203, 0.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-section {
        flex-direction: column;
        padding-left: 0;
    }
    
    .sidebar {
        width: 100%;
        position: sticky;
        top: 80px;
        left: 0;
        transform: none;
        height: auto;
        z-index: 100;
        display: flex;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .sidebar-profile-card {
        flex-shrink: 0;
        width: auto;
        min-width: 200px;
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .sidebar-nav {
        flex: 1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-item {
        padding: 0.75rem 1rem;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        width: auto;
    }
    
    .nav-badge {
        margin-left: 0.5rem;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .profile-tab span {
        display: none;
    }
    
    .profile-tab {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        flex-direction: column;
    }
    
    .sidebar-profile-card {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        padding: 1rem;
    }
    
    .sidebar-profile-photo {
        margin: 0;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .sidebar-profile-info {
        flex: 1;
        margin-bottom: 0;
    }
    
    .sidebar-profile-stats {
        border-top: none;
        border-left: 1px solid rgba(100, 216, 203, 0.15);
        padding-top: 0;
        padding-left: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sidebar-stat {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .sidebar-stat-value {
        font-size: 1rem;
    }
    
    .profile-tabs {
        padding: 0.25rem;
        gap: 0.25rem;
    }
    
    .profile-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .profile-map {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-row-4 {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .patients-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-alert {
        flex-direction: column;
        text-align: center;
    }
    
    .hours-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .record-card {
        flex-direction: column;
    }
    
    .record-date {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .modal-lg,
    .modal-xl {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 100px 0.5rem 40px;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-lg);
    }
    
    .form-row-4 {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .user-toggle span {
        display: none;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   COOKIE NOTICE
   ============================================= */
.cookie-notice {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: var(--dark-card);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: none;
    z-index: 9998;
    animation: slideUpCookie 0.5s ease;
}

body.light-mode .cookie-notice {
    background: var(--light);
    box-shadow: var(--shadow-lg);
}

.cookie-notice.show {
    display: block;
}

@keyframes slideUpCookie {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.cookie-content p {
    margin: 0;
    color: var(--text-secondary);
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cookie-accept,
.btn-cookie-reject {
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cookie-accept {
    background: var(--primary);
    color: var(--light);
}

.btn-cookie-accept:hover {
    background: var(--accent);
}

.btn-cookie-reject {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.btn-cookie-reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
    .cookie-notice {
        left: 0.5rem;
        right: 0.5rem;
        padding: 1rem;
    }
    
    .cookie-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-cookie-accept,
    .btn-cookie-reject {
        width: 100%;
    }
}

/* =============================================
   PATIENT MODAL STYLES
   ============================================= */

/* Mode Selector */
.patient-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(100, 216, 203, 0.1);
    border: 2px solid rgba(100, 216, 203, 0.2);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mode-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--light);
}

.mode-btn i {
    font-size: 1.25rem;
}

/* Search Section */
.search-instruction {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(100, 216, 203, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-instruction i {
    color: var(--primary);
    margin-top: 2px;
}

.search-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.search-input-wrapper input {
    flex: 1;
}

.btn-search {
    padding: 0 1.25rem;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--light);
    cursor: pointer;
    transition: var(--transition);
}

.btn-search:hover {
    background: var(--accent);
}

/* Search Results */
.search-results {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(100, 216, 203, 0.2);
}

.owner-found {
    animation: fadeIn 0.3s ease;
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(100, 216, 203, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.owner-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1.25rem;
}

.owner-details h4 {
    margin: 0;
    color: var(--text-primary);
}

.owner-details p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Select pets heading */
.owner-found > h5 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.owner-pets-list {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.owner-pets-list::-webkit-scrollbar {
    height: 6px;
}

.owner-pets-list::-webkit-scrollbar-track {
    background: rgba(100, 216, 203, 0.1);
    border-radius: 3px;
}

.owner-pets-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.pet-select-card {
    flex: 0 0 auto;
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem;
    background: var(--dark-card);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    scroll-snap-align: start;
    text-align: center;
}

body.light-mode .pet-select-card {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.pet-select-card.available:hover {
    border-color: var(--primary);
}

.pet-select-card.selected {
    border-color: var(--primary);
    background: rgba(100, 216, 203, 0.1);
}

.pet-select-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.1);
}

.pet-select-card.disabled:hover {
    border-color: transparent;
}

/* Checkbox for multi-select - overlay on photo */
.pet-select-checkbox {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pet-select-card.selected .pet-select-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.pet-select-checkbox input[type="checkbox"] {
    display: none;
}

.pet-select-checkbox::after {
    content: '';
    display: none;
}

.pet-select-card.selected .pet-select-checkbox::after {
    content: '✓';
    display: block;
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.pet-select-checkbox label {
    display: none;
}

/* Already linked badge - overlay style */
.pet-linked-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(76, 175, 80, 0.15);
    border-radius: var(--radius-lg);
    font-size: 0.7rem;
    color: #4CAF50;
    font-weight: 600;
}

.pet-linked-badge i {
    font-size: 1.5rem;
}

/* Link options section */
.link-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .link-options {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.btn-link-pets {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
}

.btn-link-pets:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* All linked notice */
.all-linked-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: var(--radius-md);
    color: #FFC107;
    font-size: 0.85rem;
    text-align: center;
}

.all-linked-notice i {
    font-size: 1rem;
}

/* No pets message */
.no-pets {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-size: 0.9rem;
}

.pet-select-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(100, 216, 203, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.pet-select-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-select-info {
    width: 100%;
    text-align: center;
}

.pet-select-info h5 {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pet-select-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pet-select-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.2rem 0.6rem;
    background: rgba(100, 216, 203, 0.2);
    border-radius: 100px;
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Owner Not Found */
.owner-not-found {
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.owner-not-found i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.owner-not-found p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Search Loading */
.search-loading {
    text-align: center;
    padding: 2rem;
}

.search-loading i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Step Navigation */
.step-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.step-back:hover {
    color: var(--primary);
}

/* Link Confirmation */
.link-confirmation {
    text-align: center;
}

.link-pet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: rgba(100, 216, 203, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.link-pet-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.link-pet-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-pet-info h3 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.link-pet-info p {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
}

.link-badge {
    padding: 0.25rem 1rem;
    background: var(--primary);
    border-radius: 100px;
    color: var(--light);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.link-owner-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--dark-card);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

body.light-mode .link-owner-info {
    background: rgba(0, 0, 0, 0.05);
}

.link-owner-info i {
    color: var(--primary);
}

.link-owner-info p {
    margin: 0;
    color: var(--text-primary);
    font-weight: 500;
}

.link-owner-info small {
    color: var(--text-muted);
}

/* Required field indicator */
.required {
    color: #ef4444;
}

/* =============================================
   PATIENT DETAIL MODAL
   ============================================= */
.modal-xl {
    max-width: 900px;
}

.patient-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.patient-detail-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(100, 216, 203, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    overflow: hidden;
}

.patient-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.patient-detail-title h3 {
    margin: 0;
    color: var(--text-primary);
}

.patient-detail-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.patient-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.patient-type-badge.linked {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.patient-type-badge.unlinked {
    background: rgba(241, 196, 15, 0.2);
    color: #f39c12;
}

/* Detail Tabs */
.patient-detail-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(100, 216, 203, 0.2);
    overflow-x: auto;
}

.detail-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.detail-tab:hover {
    color: var(--primary);
}

.detail-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Detail Content */
.patient-detail-body {
    min-height: 400px;
}

.detail-tab-content {
    animation: fadeIn 0.3s ease;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-section {
    background: var(--dark-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

body.light-mode .detail-section {
    background: rgba(0, 0, 0, 0.03);
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    color: var(--primary);
    font-size: 0.95rem;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(100, 216, 203, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-item .value {
    color: var(--text-primary);
    font-weight: 500;
}

.detail-notes {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Detail Actions */
.detail-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Empty State Small */
.empty-state-small {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state-small i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-state-small p {
    margin: 0;
}

/* Visit History */
.visit-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.visit-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark-card);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

body.light-mode .visit-card {
    background: rgba(0, 0, 0, 0.03);
}

.visit-date {
    text-align: center;
    min-width: 60px;
}

.visit-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.visit-date .month {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.visit-info {
    flex: 1;
}

.visit-info h5 {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.visit-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Patient Records List */
.patient-records-list,
.patient-vaccines-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.record-card,
.vaccine-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

body.light-mode .record-card,
body.light-mode .vaccine-card {
    background: rgba(0, 0, 0, 0.03);
}

.record-card:hover,
.vaccine-card:hover {
    background: rgba(100, 216, 203, 0.1);
}

.record-icon,
.vaccine-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(100, 216, 203, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.record-info,
.vaccine-info {
    flex: 1;
}

.record-info h5,
.vaccine-info h5 {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.record-info p,
.vaccine-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.record-date,
.vaccine-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =============================================
   PATIENTS GRID - IMPROVED
   ============================================= */
.patients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.patient-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(100, 216, 203, 0.1);
    overflow: visible;
    transition: var(--transition);
}

body.light-mode .patient-card {
    background: var(--light);
    box-shadow: var(--shadow-sm);
}

.patient-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(100, 216, 203, 0.15);
}

.patient-card-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.patient-card-main:hover {
    background: rgba(100, 216, 203, 0.05);
}

.patient-card-photo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(100, 216, 203, 0.2), rgba(129, 112, 207, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.75rem;
    flex-shrink: 0;
    overflow: hidden;
}

.patient-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.patient-card-info {
    flex: 1;
    min-width: 0;
}

.patient-card-info h4 {
    margin: 0 0 0.35rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.patient-card-info .patient-breed {
    margin: 0 0 0.35rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.patient-card-info .patient-owner {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.patient-card-info .patient-owner i {
    color: var(--primary);
    font-size: 0.75rem;
}

.patient-card-footer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(100, 216, 203, 0.1);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

body.light-mode .patient-card-footer {
    background: rgba(0, 0, 0, 0.03);
}

.patient-species-badge {
    padding: 0.3rem 0.75rem;
    background: rgba(100, 216, 203, 0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: capitalize;
}

.patient-link-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.patient-link-badge.linked {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.patient-link-badge.local {
    background: rgba(241, 196, 15, 0.15);
    color: #f39c12;
}

.patient-link-badge.pending {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

/* Pending patient card styles */
.patient-card.patient-pending {
    opacity: 0.85;
    border: 2px dashed #9b59b6;
}

.patient-card.patient-pending .patient-card-main {
    cursor: default;
}

.patient-card-photo {
    position: relative;
}

.pending-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(155, 89, 182, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pending-overlay i {
    color: #9b59b6;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.patient-pending-msg {
    font-size: 0.75rem;
    color: #9b59b6;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.patient-pending-msg i {
    font-size: 0.7rem;
}

.patient-menu-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.patient-menu-btn:hover {
    background: rgba(100, 216, 203, 0.2);
    color: var(--primary);
}

.patient-menu-wrapper {
    position: relative;
    margin-left: auto;
}

/* Patient Context Menu */
.patient-context-menu {
    position: absolute;
    bottom: calc(100% + 5px);
    right: 0;
    min-width: 180px;
    background: var(--dark-card);
    border: 1px solid rgba(100, 216, 203, 0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

body.light-mode .patient-context-menu {
    background: var(--light);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.1);
}

.patient-context-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu appears below if near top of viewport */
.patient-context-menu.show-below {
    bottom: auto;
    top: calc(100% + 5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body.light-mode .patient-context-menu.show-below {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.patient-context-menu button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.patient-context-menu button:hover {
    background: rgba(100, 216, 203, 0.1);
}

.patient-context-menu button i {
    width: 16px;
    color: var(--text-muted);
}

.patient-context-menu button.menu-warning {
    color: #f39c12;
}

.patient-context-menu button.menu-warning i {
    color: #f39c12;
}

.patient-context-menu button.menu-danger {
    color: #ef4444;
}

.patient-context-menu button.menu-danger i {
    color: #ef4444;
}

.patient-context-menu button.menu-warning:hover {
    background: rgba(243, 156, 18, 0.15);
}

.patient-context-menu button.menu-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Confirm Dialog */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-dialog-overlay.show {
    opacity: 1;
}

.confirm-dialog {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

body.light-mode .confirm-dialog {
    background: var(--light);
    box-shadow: var(--shadow-lg);
}

.confirm-dialog-overlay.show .confirm-dialog {
    transform: scale(1);
}

.confirm-dialog-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

.confirm-dialog-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.confirm-dialog-icon.warning {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.confirm-dialog h3 {
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.confirm-dialog p {
    margin: 0 0 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-dialog-buttons .btn-secondary,
.confirm-dialog-buttons .btn-danger,
.confirm-dialog-buttons .btn-warning {
    min-width: 100px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.confirm-dialog-buttons .btn-secondary {
    background: rgba(100, 216, 203, 0.1);
    border: 1px solid rgba(100, 216, 203, 0.2);
    color: var(--text-primary);
}

.confirm-dialog-buttons .btn-secondary:hover {
    background: rgba(100, 216, 203, 0.2);
}

.confirm-dialog-buttons .btn-danger {
    background: #ef4444;
    border: none;
    color: white;
}

.confirm-dialog-buttons .btn-danger:hover {
    background: #dc2626;
}

.confirm-dialog-buttons .btn-warning {
    background: #f39c12;
    border: none;
    color: white;
}

.confirm-dialog-buttons .btn-warning:hover {
    background: #e67e22;
}

/* Linked Patient Notice */
.linked-patient-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    color: #60a5fa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.linked-patient-notice i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Readonly fields */
.field-readonly {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(100, 216, 203, 0.05) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .patient-mode-selector {
        flex-direction: column;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .patients-grid {
        grid-template-columns: 1fr;
    }
    
    .patient-detail-tabs {
        padding: 0 1rem;
    }
    
    .detail-tab span {
        display: none;
    }
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 2rem;
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary);
    color: var(--text-primary);
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.toast.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.toast.info {
    border-color: var(--primary);
    background: rgba(100, 216, 203, 0.2);
}

body.light-mode .toast {
    background: var(--light);
    box-shadow: var(--shadow-lg);
}

body.light-mode .toast.success {
    background: rgba(39, 174, 96, 0.1);
}

body.light-mode .toast.error {
    background: rgba(239, 68, 68, 0.1);
}

body.light-mode .toast.info {
    background: rgba(100, 216, 203, 0.1);
}

/* No pets message */
.no-pets {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-style: italic;
}

/* =============================================
   PATIENT DETAIL MODAL - Fixed Height
   ============================================= */
#patientDetailModal .modal-content {
    max-width: 800px;
    height: 80vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#patientDetailModal .modal-header {
    flex-shrink: 0;
}

#patientDetailModal .patient-detail-tabs {
    flex-shrink: 0;
}

#patientDetailModal .modal-body.patient-detail-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Tab content containers - ensure consistent layout */
#patientDetailModal .detail-tab-content {
    min-height: 350px;
}

#patientDetailModal .modal-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* =============================================
   FOOTER - Below Content, Not Behind Sidebar
   ============================================= */
.footer {
    position: relative;
    z-index: 50;
    clear: both;
}

/* Ensure body and main are set up for footer placement */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

/* Dashboard section should not have the sidebar overlap footer */
.dashboard-section {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* =============================================
   VACCINE GRID & CONTAINER
   ============================================= */

/* Container for vaccines tab */
.vaccines-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 400px;
}

.vaccines-header-fixed {
    flex-shrink: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(100, 216, 203, 0.1);
    margin-bottom: 1rem;
}

.vaccines-scroll-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.5rem;
}

/* Grid layout for vaccine cards */
.patient-vaccines-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .patient-vaccines-grid {
        grid-template-columns: 1fr;
    }
}

/* New Vaccine Card Design */
.vaccine-card-new {
    background: var(--dark-card);
    border-radius: var(--radius-lg);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.light-mode .vaccine-card-new {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vaccine-card-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(100, 216, 203, 0.3);
}

.vaccine-card-new.status-overdue {
    border-left: 4px solid #ef4444;
}

.vaccine-card-new.status-warning {
    border-left: 4px solid #f59e0b;
}

.vaccine-card-new.status-ok {
    border-left: 4px solid #22c55e;
}

/* Card Header */
.vaccine-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.vaccine-card-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: rgba(100, 100, 100, 0.15);
    color: var(--text-muted);
}

.vaccine-card-status-icon.status-overdue {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.vaccine-card-status-icon.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.vaccine-card-status-icon.status-ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.vaccine-card-title {
    flex: 1;
    min-width: 0;
}

.vaccine-card-title h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.vaccine-card-vet {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.vaccine-card-vet i {
    font-size: 0.7rem;
}

/* Card Dates */
.vaccine-card-dates {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
}

body.light-mode .vaccine-card-dates {
    background: rgba(0, 0, 0, 0.03);
}

.vaccine-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.vaccine-date-label {
    color: var(--text-muted);
}

.vaccine-date-value {
    color: var(--text-primary);
    font-weight: 500;
}

.vaccine-date-value.status-overdue {
    color: #ef4444;
}

.vaccine-date-value.status-warning {
    color: #f59e0b;
}

.vaccine-date-value.status-ok {
    color: #22c55e;
}

/* Card Footer */
.vaccine-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.vaccine-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
}

.vaccine-status-badge.status-overdue {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.vaccine-status-badge.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.vaccine-status-badge.status-ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.vaccine-card-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.vaccine-card-new:hover .vaccine-card-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

/* Toggle Group Styling */
.toggle-group {
    background: rgba(100, 216, 203, 0.05);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

/* Toggle Label for forms */
.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.toggle-label span:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--text-muted);
    border-radius: 13px;
    transition: background 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-label input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-slider::after {
    transform: translateX(22px);
}

.toggle-label input {
    display: none;
}

/* Danger Button Outline */
.btn-danger-outline {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-full {
    width: 100%;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

/* =============================================
   DELETE CONFIRMATION MODAL
   ============================================= */

.modal-sm .modal-content {
    max-width: 420px;
}

.delete-warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.delete-warning i {
    font-size: 2.5rem;
    color: #ef4444;
    margin-bottom: 0.75rem;
}

.delete-warning p {
    color: var(--text-secondary);
    margin: 0;
}

.delete-info {
    text-align: center;
    padding: 1rem;
    background: rgba(100, 216, 203, 0.05);
    border-radius: var(--radius-md);
}

.delete-info p {
    margin: 0.25rem 0;
    color: var(--text-primary);
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* =============================================
   APPOINTMENT TABLE IMPROVEMENTS
   ============================================= */

.appointment-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.appointment-datetime .apt-date {
    font-weight: 500;
    color: var(--text-primary);
}

.appointment-datetime .apt-time {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.patient-name-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.patient-name-cell i {
    color: var(--primary);
}

/* Appointment Status Badges */
.appointment-status.status-scheduled {
    background: rgba(100, 216, 203, 0.15);
    color: var(--primary);
}

.appointment-status.status-confirmed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.appointment-status.status-completed {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.appointment-status.status-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.appointment-status.status-no-show {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Time slot occupied in dropdown */
select option.time-occupied,
select option:disabled {
    color: #9ca3af;
    background-color: rgba(156, 163, 175, 0.1);
}

/* Clickable appointment items */
.appointment-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.appointment-item:hover {
    background: rgba(100, 216, 203, 0.1);
    transform: translateX(4px);
}
