:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft: rgba(99, 102, 241, 0.1);
    --secondary: #64748b;
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(226, 232, 240, 0.8);
    --success: #10b981;
    --error: #ef4444;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.app-header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.brand span span {
    color: var(--primary);
}

.logo-icon {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.925rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.main-nav a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.main-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.icon-button:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}
.app-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

.page-heading {
    margin-bottom: 2rem;
}

.page-heading h1 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.975rem;
}
.card, .form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.patient-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.patient-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: rgba(248, 250, 252, 0.5);
}

.patient-table td {
    padding: 1rem;
    font-size: 0.925rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.patient-table tr:last-child td {
    border-bottom: none;
}

.patient-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.id-badge {
    color: var(--text-muted);
    font-family: monospace;
    font-weight: 600;
}

.patient-name {
    font-weight: 600;
    color: var(--text-main);
}

.email-cell {
    color: var(--text-muted);
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
}

.add-patient-btn{
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.add-patient-btn:hover{
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-icon.edit {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn-icon.edit:hover {
    background: var(--primary);
    color: white;
}

.btn-icon.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.btn-icon.delete:hover {
    background: var(--error);
    color: white;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

input, textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    transition: all 0.2s;
    background: white;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.primary-button, .secondary-button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.925rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    text-decoration: none;
}

.primary-button {
    background: var(--primary);
    color: white;
}

.primary-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.secondary-button {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.secondary-button:hover {
    background: var(--bg-main);
    border-color: var(--text-muted);
}

/* Alerts */
.message-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.925rem;
    font-weight: 500;
}

.message-box.success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.message-box.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.app-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    background: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
