:root {
    --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #3b82f6;
    --error-color: #ef4444;
    --success-color: #10b981;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.8s ease-out;
}

.login-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

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

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-logo {
    height: 48px;
    width: auto;
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

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

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

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

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 48px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f1f5f9;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.helper-text {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-msg {
    background: #fee2e2;
    color: var(--error-color);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    display: none;
    text-align: center;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

/* Dashboard Styles */
.app-header {
    background: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info span {
    font-weight: 600;
}

.btn-logout {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #f1f5f9;
}

.main-content {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.profile-icon {
    width: 64px;
    height: 64px;
    background: #eff6ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-meta {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.profile-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #ecfdf5;
    color: #059669;
}

.status-closed {
    background: #f1f5f9;
    color: #64748b;
}

/* Details Page Styles */
.back-btn {
    text-decoration: none;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.detail-container {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.detail-header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px;
}

.patient-main-info {
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

.patient-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.patient-name-large {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.patient-sub-meta {
    font-size: 16px;
    opacity: 0.8;
}

.detail-body {
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

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

.vitals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.vital-item {
    background: #f8fafc;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
}

.vital-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.vital-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.history-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.history-date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.history-doctor {
    font-weight: 600;
    color: var(--accent-color);
}

.history-section-item {
    margin-top: 16px;
}

.history-section-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.history-section-content {
    color: var(--text-secondary);
    font-size: 14px;
}

.med-tag {
    display: inline-block;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 8px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Specific Utilities */
.mt-4 {
    margin-top: 16px;
}

.mr-2 {
    margin-right: 8px;
}

.btn-download-pdf {
    margin-top: 20px;
    padding: 10px 18px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    width: fit-content;
}

.btn-download-pdf:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

.btn-download-pdf svg {
    opacity: 0.8;
}

/* Vitals Entry UI */
.fab-vitals {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-vitals:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(37, 99, 235, 0.5);
}

.vitals-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    z-index: 2000;
    display: none;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.vitals-modal.active {
    display: block;
}

.vitals-modal-content {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100%;
    padding: 20px;
    padding-bottom: 100px;
}

.vitals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    color: #1e293b;
}

.icon-btn {
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1e293b;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #f8fafc;
    box-shadow: var(--shadow-md);
}

.vitals-tabs {
    background: #e2e8f0;
    padding: 6px;
    border-radius: 14px;
    display: flex;
    gap: 6px;
    margin-bottom: 30px;
}

.v-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.v-tab.active {
    background: white;
    color: #1e40af;
    box-shadow: var(--shadow-sm);
}

.vitals-form-group {
    margin-bottom: 24px;
}

.vitals-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.time-input-styled {
    background: white;
    padding: 16px;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-input-styled input {
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    width: 100%;
    background: transparent;
}

.vitals-grid-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.v-input-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1.5px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s;
}

.v-input-card:focus-within {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.v-card-label {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-card-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v-card-inputs input,
.v-single-input {
    width: 80px;
    padding: 10px;
    border-radius: 12px;
    border: 1.5px solid #f1f5f9;
    background: #f8fafc;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #004080;
    outline: none;
}

.v-single-input {
    width: 100%;
}

.v-card-unit {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
}

.special-section-title {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.v-glucose-card {
    margin-bottom: 30px;
}

.v-select {
    padding: 10px;
    border-radius: 12px;
    border: 1.5px solid #f1f5f9;
    background: #f8fafc;
    font-weight: 600;
    outline: none;
    color: #475569;
}

.btn-update-vitals {
    width: 100%;
    padding: 18px;
    background: #004080;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-update-vitals:hover {
    background: #003366;
    transform: translateY(-2px);
}

/* Custom Styled Select Dropdown */
.v-select-wrapper {
    position: relative;
    width: 100%;
}

.v-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 14px 20px;
    padding-right: 45px;
    background-color: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
}

.v-select:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.v-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.v-select option {
    background-color: white;
    color: #1e293b;
    font-weight: 500;
    padding: 10px;
}

/* Specific styling for the Glucose type selector in the add form */
.v-glucose-card .v-select {
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    border-radius: 12px;
    width: auto;
    flex: 0 0 auto;
    min-width: 150px;
}

/* Completely Custom Select Menu Styles */
.custom-select-container {
    position: relative;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.custom-select-trigger:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.custom-select-trigger.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow: hidden;
    display: none;
    transform-origin: top;
    animation: menuFadeIn 0.2s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-select-options.show {
    display: block;
}

.custom-option {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-option:hover {
    background: #eff6ff;
    color: #2563eb;
}

.custom-option.selected {
    background: #f1f5f9;
    color: #1e40af;
    font-weight: 700;
}

.custom-option-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Notification Toast */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast.hide {
    animation: toastOut 0.3s forwards;
}

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

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    font-size: 18px;
}
/* Responsive Fixes for Vitals Modal */
@media (max-width: 600px) {
    .vitals-modal-content {
        padding: 15px;
    }
    
    .vitals-grid-input {
        gap: 12px;
    }
    
    .v-input-card {
        padding: 15px 10px;
        gap: 8px;
        border-radius: 16px;
    }
    
    .v-card-label {
        font-size: 13px;
        gap: 6px;
    }
    
    .v-card-label svg {
        width: 14px;
        height: 14px;
    }
    
    .v-card-inputs input, .v-single-input {
        font-size: 16px;
        padding: 8px;
        width: 65px;
        border-radius: 10px;
    }
    
    .v-single-input {
        width: 100%;
    }
    
    .v-card-unit {
        font-size: 12px;
    }
    
    .time-input-styled {
        padding: 12px 15px;
    }
    
    .time-input-styled input {
        font-size: 16px;
    }
    
    .special-section-title {
        margin-top: 25px;
        font-size: 16px;
    }
    
    .vitals-tabs {
        margin-bottom: 20px;
    }
    
    .v-tab {
        padding: 10px 5px;
        font-size: 13px;
    }
    
    .btn-update-vitals {
        padding: 15px;
        font-size: 16px;
        border-radius: 14px;
    }
}

@media (max-width: 380px) {
    .vitals-grid-input {
        grid-template-columns: 1fr;
    }
}
