/* Material Design styles for EPrescripta Login/Signup pages */

/* Material Design color palette */
:root {
    --primary-color: #ff6b6b;
    --primary-dark: #ff5252;
    --primary-light: #ffcdd2;
    --secondary-color: #2196f3;
    --surface-color: #ffffff;
    --background-color: #fafafa;
    --on-surface: #212121;
    --on-primary: #ffffff;
    --text-secondary: #757575;
    --divider: #e0e0e0;
    --shadow-light: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-medium: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    --shadow-heavy: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

/* Base body styling - Material Design background */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: transparent;
    position: relative;
    min-height: 100vh;
}

/* Material Design background with static gradient and subtle texture */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, #ff8a80 0%, #ffab91 50%, #ffccbc 100%),
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
}

/* Subtle static texture overlay */
.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 60px 60px, 70px 70px;
    opacity: 0.6;
}

.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 40px 40px, 90px 90px, 55px 55px;
    opacity: 0.4;
}

/* Material Design elevation and animation */
@keyframes material-enter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes material-exit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-24px) scale(0.95);
    }
}

/* Material Design card styling */
.login-card {
    background: var(--surface-color);
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    animation: material-enter 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

/* Material Design ripple effect */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.login-card:hover::before {
    opacity: 1;
}

/* Material Design form input styling */
.form-control {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--divider) !important;
    color: var(--on-surface) !important;
    border-radius: 0 !important;
    padding: 12px 0 !important;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: none !important;
}

.form-control:focus {
    background: transparent !important;
    border-color: var(--primary-color) !important;
    box-shadow: none !important;
    color: var(--on-surface) !important;
    outline: none;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
    color: var(--primary-color) !important;
    transform: translateY(-20px) scale(0.75);
}

.form-control::placeholder {
    color: var(--text-secondary) !important;
    opacity: 1;
}

/* Material Design floating labels */
.form-floating {
    position: relative;
}

.form-floating .form-control {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating .form-label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    color: var(--text-secondary);
}

/* Input group text styling - Material Design */
.input-group-text {
    border: none !important;
    background: transparent !important;
    border-bottom: 2px solid var(--divider) !important;
    border-radius: 0 !important;
    color: var(--text-secondary);
    padding: 12px 0;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.input-group:focus-within .input-group-text {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Material Design button styling */
.btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

/* Material Design ripple effect for buttons */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.btn-outline-light {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-outline-light:hover {
    background: var(--primary-color);
    color: var(--on-primary);
    box-shadow: var(--shadow-light);
    transform: translateY(-1px);
}

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

/* Material Design typography and text styling */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    color: #2c2c2c;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.text-white {
    color: #2c2c2c !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.text-white-50 {
    color: #4a4a4a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Link styling - Material Design */
.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.btn-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.btn-link:hover::after {
    width: 100%;
}

/* Form text styling - Material Design */
.form-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Material Design responsive adjustments */
@media (max-width: 768px) {
    .login-card {
        margin: 16px;
        border-radius: 4px;
    }
    
    .card-body {
        padding: 2rem !important;
    }
    
    .btn-primary, .btn-outline-light {
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* Material Design elevation states */
.elevation-1 {
    box-shadow: var(--shadow-light);
}

.elevation-2 {
    box-shadow: var(--shadow-medium);
}

.elevation-3 {
    box-shadow: var(--shadow-heavy);
}

/* Material Design focus states */
.form-control:focus {
    border-bottom-color: var(--primary-color) !important;
    box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

/* Material Design button states */
.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

.btn-outline-light:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

/* Dashboard Layout Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: var(--surface-color);
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--divider);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-section .material-icons {
    font-size: 32px;
    color: var(--primary-color);
}

.logo-text {
    font-size: 24px;
    font-weight: 500;
    color: var(--on-surface);
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    margin: 4px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    font-weight: 400;
}

.nav-link:hover {
    background: rgba(255, 107, 107, 0.08);
    color: var(--primary-color);
}

.nav-item.active .nav-link {
    background: rgba(255, 107, 107, 0.12);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.nav-link .material-icons {
    font-size: 20px;
}

.nav-link .badge {
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* User Profile Section */
.user-profile {
    padding: 20px;
    border-top: 1px solid var(--divider);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    color: var(--on-surface);
    font-size: 14px;
    margin-bottom: 2px;
}

.user-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--divider);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.btn-logout:hover {
    background: rgba(255, 107, 107, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: transparent;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.main-header {
    background: var(--surface-color);
    padding: 16px 24px;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-light);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 107, 107, 0.08);
    color: var(--primary-color);
}

.page-title {
    font-size: 24px;
    font-weight: 400;
    color: var(--on-surface);
    margin: 0;
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard Content */
.dashboard-content {
    padding: 24px;
}

.welcome-section {
    margin-bottom: 32px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 300;
    color: var(--on-surface);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* Summary Cards */
.summary-cards {
    margin-bottom: 32px;
}

.summary-card {
    background: var(--surface-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    height: 100%;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon.pending {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.card-icon.ready {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.card-icon.spent {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

.card-icon.points {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
}

.card-icon .material-icons {
    font-size: 24px;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 20px;
    font-weight: 400;
    color: var(--on-surface);
    margin: 0;
}

/* Prescription History */
.prescription-history {
    background: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.section-header {
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid var(--divider);
}

.section-title {
    font-size: 20px;
    font-weight: 400;
    color: var(--on-surface);
    margin: 0 0 16px 0;
}

.history-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-item {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border: 1px solid var(--divider);
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-date {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.history-doctor, .history-pharmacy {
    font-size: 16px;
    font-weight: 600;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.history-medications {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.med-tag {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.history-total {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.history-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 8px;
    background: #e8f5e8;
    color: #2e7d32;
    font-weight: 500;
    display: inline-block;
    width: fit-content;
}

.history-actions {
    display: flex;
    align-items: center;
}

.history-content {
    padding: 24px;
}

.history-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.history-header .section-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
}

.history-header .section-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state .material-icons {
    font-size: 48px;
    color: var(--divider);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Bottom Navigation Bar */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-top: 1px solid var(--divider);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    flex: 1;
    min-width: 0;
}

.bottom-nav .nav-item.active {
    color: var(--primary-color);
}

.bottom-nav .nav-item .material-icons {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-nav .nav-item span {
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bottom-nav .nav-center {
    flex: 0 0 auto;
    padding: 0 8px;
}

.center-button {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.center-button .material-icons {
    color: white;
    font-size: 24px;
    margin: 0;
}

.center-button:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

/* Header updates for mobile */
.header-title {
    display: none;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .header-title {
        display: block;
    }
    
    .page-title {
        font-size: 20px;
        font-weight: 600;
        margin: 0;
    }
    
    .section-content {
        padding: 16px;
    }
    
    .page-subtitle {
        font-size: 14px;
        color: var(--text-secondary);
        margin: 0;
    }
    
    .dashboard-content {
        padding: 16px;
    }
    
    .welcome-section {
        display: none; /* Hide welcome section on mobile */
    }
    
    .summary-cards .row {
        margin: 0 -8px;
    }
    
    .summary-cards .col-12 {
        padding: 0 8px;
        margin-bottom: 16px;
    }
    
    .summary-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .card-value {
        font-size: 18px;
    }
    
    .prescription-history {
        border-radius: 12px;
    }
    
    .section-header {
        padding: 20px 20px 0 20px;
    }
    
    .history-content {
        padding: 20px;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
    
    .sidebar {
        display: flex;
    }
    
    .main-content {
        margin-left: 280px;
    }
    
    .sidebar-toggle {
        display: none;
    }
}

/* Section Content Styling */
.section-content {
    padding: 24px;
    min-height: calc(100vh - 80px);
}

/* Upload Section Styles */
.upload-content {
    padding: 24px;
    min-height: calc(100vh - 80px);
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.section-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--on-surface);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.upload-options {
    margin-bottom: 32px;
}

.upload-option-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-light);
}

.upload-option-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.upload-option-card:hover .upload-icon {
    background: var(--primary-color);
    transform: scale(1.1);
}

.upload-icon .material-icons {
    font-size: 40px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.upload-option-card:hover .upload-icon .material-icons {
    color: white;
}

.upload-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--on-surface);
    margin-bottom: 12px;
}

.upload-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Camera Section */
.camera-section {
    margin-top: 32px;
}

.camera-container {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.camera-preview {
    width: 100%;
    max-width: 500px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.camera-controls .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
}

/* File Upload Section */
.file-upload-section {
    margin-top: 32px;
}

.file-upload-container {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-medium);
}

.file-drop-zone {
    border: 2px dashed var(--divider);
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 107, 107, 0.02);
}

.file-drop-zone:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 107, 0.05);
}

.file-drop-zone .material-icons {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.file-drop-zone p {
    font-size: 16px;
    color: var(--on-surface);
    margin-bottom: 8px;
    font-weight: 500;
}

.file-drop-zone small {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Preview Section */
.preview-section {
    margin-top: 32px;
}

.image-preview {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.image-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.image-controls .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
}

/* Placeholder Content */
.placeholder-content {
    padding: 24px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-container {
    text-align: center;
    background: var(--surface-color);
    border-radius: 12px;
    padding: 48px 32px;
    box-shadow: var(--shadow-light);
}

.placeholder-container h2 {
    font-size: 24px;
    font-weight: 400;
    color: var(--on-surface);
    margin-bottom: 16px;
}

.placeholder-container p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* Cart Section Styles */
.cart-content {
    padding: 24px;
    min-height: calc(100vh - 80px);
}

.cart-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.cart-items {
    margin-bottom: 32px;
}

.cart-item {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 16px;
}

.item-image {
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-image .material-icons {
    font-size: 32px;
    color: var(--primary-color);
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 18px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 4px 0;
}

.item-description {
    font-size: 14px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0 0 8px 0;
}

.item-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.item-strength {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity {
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.item-price {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.empty-cart {
    text-align: center;
    padding: 48px 24px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.empty-cart .material-icons {
    font-size: 64px;
    color: var(--divider);
    margin-bottom: 16px;
}

.empty-cart h3 {
    font-size: 20px;
    font-weight: 400;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0 0 8px 0;
}

.empty-cart p {
    font-size: 14px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0;
}

.cart-summary {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-light);
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
}

.summary-row.total {
    font-weight: 600;
    font-size: 18px;
    border-bottom: none;
    border-top: 2px solid var(--primary-color);
    margin-top: 8px;
    padding-top: 16px;
}

.checkout-section {
    text-align: center;
}

.checkout-btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 500;
}

/* Find Medication Styles */
.find-content {
    padding: 24px;
    min-height: calc(100vh - 80px);
}

.find-container {
    max-width: 900px;
    margin: 0 auto;
}

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

.search-section {
    margin-bottom: 32px;
}

.search-input-group {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--divider);
    font-size: 16px;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.medication-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-light);
}

.med-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 8px;
}

.med-name {
    font-size: 24px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0;
}

.med-type-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    display: inline-block;
}

.med-description {
    margin-bottom: 20px;
}

.med-description p {
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin: 0;
}

.med-uses {
    margin-bottom: 20px;
}

.med-uses h4 {
    font-size: 16px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
}

.med-uses ul {
    margin: 0;
    padding-left: 20px;
}

.med-uses li {
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.pharmacy-availability h4 {
    font-size: 16px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 16px 0;
}

.pharmacy-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.pharmacy-info .material-icons {
    color: var(--primary-color);
}

.pharmacy-info strong {
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.pharmacy-info p {
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin: 0;
}

.pharmacy-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.in-stock {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.status-badge.low-stock {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-badge.out-of-stock {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.price {
    font-weight: 600;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 48px 24px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.no-results .material-icons {
    font-size: 64px;
    color: var(--divider);
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 20px;
    font-weight: 400;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0 0 8px 0;
}

.no-results p {
    font-size: 14px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Settings Section Styles */
.settings-content {
    padding: 24px;
    min-height: calc(100vh - 80px);
}

.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-light);
}

.settings-section-title {
    font-size: 20px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.settings-item {
    margin-bottom: 16px;
}

.settings-item:last-child {
    margin-bottom: 0;
}

.settings-item-content h4 {
    font-size: 16px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
}

.settings-item-content p {
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0 0 4px 0;
    line-height: 1.5;
}

.settings-item-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.settings-item-content li {
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    line-height: 1.5;
}

/* Mobile Responsive for Upload */
@media (max-width: 768px) {
    .upload-content, .cart-content, .find-content, .settings-content {
        padding: 16px;
    }
    
    .upload-option-card {
        padding: 24px 16px;
    }
    
    .upload-icon {
        width: 64px;
        height: 64px;
    }
    
    .upload-icon .material-icons {
        font-size: 32px;
    }
    
    .upload-title {
        font-size: 18px;
    }
    
    .camera-preview {
        height: 250px;
    }
    
    .file-drop-zone {
        padding: 32px 16px;
    }
    
    .file-drop-zone .material-icons {
        font-size: 40px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .item-actions {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .pharmacy-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .pharmacy-status {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Loading animation for form submission */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* OCR Processing Styles */
.processing-section {
    text-align: center;
    padding: 40px 20px;
}

.processing-container {
    max-width: 400px;
    margin: 0 auto;
}

.processing-header {
    margin-bottom: 24px;
}

.processing-header .material-icons {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.processing-header h3 {
    font-size: 20px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
}

.processing-header p {
    font-size: 14px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0;
}

.rotating {
    animation: rotate 2s linear infinite;
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Extracted Text Styles */
.extracted-text-section {
    margin: 24px 0;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.extracted-text-section h3 {
    font-size: 18px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 16px 0;
}

.extracted-text-content {
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--divider);
    margin-bottom: 16px;
}

.extracted-text-content pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #2c2c2c;
    white-space: pre-wrap;
}

.text-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Bill Section Styles */
.bill-section {
    margin-top: 24px;
}

.bill-container {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-light);
}

.bill-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
}

.bill-header h3 {
    font-size: 20px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
}

.bill-header p {
    font-size: 14px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0;
}

.bill-items {
    margin-bottom: 24px;
}

.bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.1);
}

.item-info h4 {
    font-size: 16px;
    font-weight: 500;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0 0 4px 0;
}

.item-info p {
    font-size: 14px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    margin: 0 0 4px 0;
}

.quantity {
    font-size: 12px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.item-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.unit-price {
    font-size: 12px;
    color: #4a4a4a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.total-price {
    font-size: 16px;
    font-weight: 600;
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.bill-summary {
    border-top: 1px solid var(--divider);
    padding-top: 16px;
    margin-bottom: 24px;
}

.bill-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.bill-summary .summary-row.total {
    font-weight: 600;
    font-size: 18px;
    border-bottom: none;
    border-top: 2px solid var(--primary-color);
    margin-top: 8px;
    padding-top: 16px;
}

.bill-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Mobile Responsive for OCR */
@media (max-width: 768px) {
    .processing-section {
        padding: 24px 16px;
    }
    
    .processing-header .material-icons {
        font-size: 40px;
    }
    
    .extracted-text-section {
        margin: 16px 0;
        padding: 16px;
    }
    
    .extracted-text-content {
        max-height: 150px;
    }
    
    .bill-container {
        padding: 16px;
    }
    
    .bill-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .med-type-badge {
        font-size: 11px;
        padding: 4px 12px;
        border-radius: 16px;
    }
    
    .med-name {
        font-size: 20px;
    }
    
    .item-pricing {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
    
    .bill-actions {
        flex-direction: column;
    }
    
    .text-controls {
        flex-direction: column;
    }
}
