:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Auth Page */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    text-align: center;
}

.auth-card h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

button {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

button:active {
    transform: translateY(0);
}

/* Dashboard Layout */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
}

/* Visit Planning Section */
.planning-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

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

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

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

.doctor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.btn-small {
    padding: 0.5rem 1rem;
    width: auto;
    font-size: 0.875rem;
}

/* Visit View */
.visit-status {
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.activity-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.activity-btn {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
}

.activity-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.activity-btn.selected {
    background: var(--primary);
    color: white;
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }

    .planning-grid {
        gap: 1rem;
    }

    button, .btn-small {
        min-height: 48px; /* Touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
}

/* Ensure buttons are clickable above glass effects */
button, select, input {
    position: relative;
    z-index: 10;
}
