@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    /* Premium Light-Clean Color Palette */
    --primary: hsl(172, 75%, 36%);       /* Medical Teal Accent */
    --primary-hover: hsl(172, 75%, 28%);
    --primary-light: rgba(13, 148, 136, 0.06);
    
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    
    --text-main: #0f172a;               /* Slate 900 */
    --text-muted: #475569;              /* Slate 600 */
    --text-light-muted: #64748b;        /* Slate 500 */
    
    --line-green: #06C755;
    --line-green-hover: #05b04b;
    
    --error-red: #ef4444;
    --success-green: #10b981;
    
    /* UI Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

/* Clean Container */
.glass-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 800px;
    padding: 40px;
    animation: fadeIn 0.4s ease-out;
    transition: var(--transition);
}

.glass-container.login-box {
    max-width: 440px;
    text-align: center;
    padding: 48px 36px;
}

/* Typography & Headings */
h1 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 24px;
}

p.subtitle {
    font-size: 0.92rem;
    color: var(--text-light-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Clinic Logo Header */
.clinic-logo-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary-light);
    border: 1.5px solid rgba(13, 148, 136, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 26px;
    transition: var(--transition);
}

.glass-container.login-box:hover .clinic-logo-wrapper {
    transform: scale(1.05);
    background: rgba(13, 148, 136, 0.1);
}

/* LINE Login Button */
.btn-line-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--line-green);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 24px;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.15);
}

.btn-line-login:hover {
    background-color: var(--line-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(6, 199, 85, 0.25);
}

/* App Header - Search Dashboard */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 18px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.user-profile-badge img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid var(--primary);
}

.user-profile-badge span {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Search Bar Wrapper */
.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light-muted);
    font-size: 1rem;
}

.search-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 12px 14px 12px 38px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(13, 148, 136, 0.12);
}

.btn-search {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

/* Logout link */
.btn-logout {
    color: var(--text-light-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    color: var(--error-red);
    background: rgba(239, 68, 68, 0.06);
}

/* Alert & Info cards */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 22px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    line-height: 1.4;
    animation: slideDown 0.25s ease-out;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
}

/* Premium Profile Card */
.profile-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 28px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    animation: scaleUp 0.3s ease-out;
}

@media (max-width: 600px) {
    .profile-card {
        justify-items: center;
        text-align: center;
    }
}

.profile-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
}

.profile-code {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(13, 148, 136, 0.15);
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.detail-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.detail-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.detail-label {
    font-size: 0.72rem;
    color: var(--text-light-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.badge-gender {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* Welcome instruction area */
.welcome-placeholder {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-light-muted);
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--radius-md);
    background: #f8fafc;
    transition: var(--transition);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}
