@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-surface: rgba(17, 24, 39, 0.7);
    --bg-card: rgba(31, 41, 55, 0.5);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(52, 211, 153, 0.15);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --primary: #10b981; /* Emerald Green */
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.3);
    
    --accent: #6366f1; /* Indigo */
    --accent-hover: #4f46e5;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px 2px rgba(16, 185, 129, 0.15);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* Auth Screens Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    transition: border-color var(--transition-normal);
}

.auth-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 20px 2px rgba(16, 185, 129, 0.05);
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-logo i {
    color: var(--primary);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-input {
    width: 100%;
    background-color: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: rgba(17, 24, 39, 0.9);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
}

.checkbox-container input {
    accent-color: var(--primary);
    width: 1rem;
    height: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: #111827;
}

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Alert Notification */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

/* Layout Admins & General Panels */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 2.5rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-item a:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.sidebar-item.active a {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background-color: var(--bg-secondary);
}

.top-bar-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid var(--primary);
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.content-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

/* Cards & Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Stat card specific */
.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary);
}

/* Data Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--bg-surface);
}

.data-table th {
    background-color: rgba(17, 24, 39, 0.8);
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Badge styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Progress bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width var(--transition-normal);
}

/* Dose scheduling list styling (for patient panel) */
.dose-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dose-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dose-item:hover {
    border-color: rgba(16, 185, 129, 0.2);
    transform: translateX(4px);
}

.dose-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dose-medication {
    font-size: 1rem;
    font-weight: 600;
}

.dose-time-details {
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.dose-actions {
    display: flex;
    gap: 0.5rem;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Custom Pagination Design */
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

nav[role="navigation"] svg {
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
}

nav[role="navigation"] .flex.justify-between.flex-1 {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

nav[role="navigation"] .hidden {
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    nav[role="navigation"] .hidden {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

nav[role="navigation"] span.relative.z-0 {
    display: inline-flex;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

nav[role="navigation"] span.relative.z-0 a,
nav[role="navigation"] span.relative.z-0 span {
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-right: 1px solid var(--border-color);
    background: transparent;
    text-decoration: none;
    transition: all var(--transition-fast);
}

nav[role="navigation"] span.relative.z-0 a:last-child,
nav[role="navigation"] span.relative.z-0 span:last-child {
    border-right: none;
}

nav[role="navigation"] span.relative.z-0 a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

nav[role="navigation"] span.relative.z-0 span[aria-current="page"] {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: var(--primary) !important;
    font-weight: 600;
}

nav[role="navigation"] span.relative.z-0 span[aria-disabled="true"] {
    color: var(--text-muted);
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.02);
}

nav[role="navigation"] p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

nav[role="navigation"] p span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Highlight yellow for current active doses */
.data-table tr.row-highlight-yellow td {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-bottom-color: rgba(245, 158, 11, 0.3) !important;
}

.dose-item.row-highlight-yellow {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}


