/* Ceylon Wellspring Hospital Information System - Main CSS */
:root {
    /* Green Theme Colors */
    --primary-green: #0a5c36;
    --secondary-green: #1e7e4c;
    --light-green: #2ba56a;
    --pale-green: #e8f5e9;
    --dark-green: #094e2e;
    --accent-green: #34d399;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    --text-dark: #212529;
    
    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Login Page Styles */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: var(--white);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hospital-brand {
    margin-bottom: 60px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.logo i {
    margin-right: 15px;
    font-size: 40px;
}

.hospital-brand h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.hospital-brand p {
    font-size: 16px;
    opacity: 0.9;
}

.hospital-features {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature {
    display: flex;
    align-items: center;
    font-size: 18px;
}

.feature i {
    font-size: 24px;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-container h2 {
    color: var(--primary-green);
    font-size: 32px;
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--dark-gray);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 15px;
}

.form-group label i {
    margin-right: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all 0.3s;
    background-color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.1);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    font-size: 18px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn i {
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-green), var(--secondary-green));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(to right, var(--dark-green), var(--primary-green));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning);
    color: var(--text-dark);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-info {
    background-color: var(--info);
    color: var(--white);
}

.btn-login {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    margin-top: 10px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--accent-green);
}

.menu-item i {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

/* Header */
.header {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: var(--primary-green);
    font-size: 28px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background-color: var(--pale-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-size: 20px;
    font-weight: 600;
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 25px;
    margin-bottom: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--pale-green);
}

.card-title {
    color: var(--primary-green);
    font-size: 20px;
    font-weight: 600;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--primary-green);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background-color: var(--pale-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
    color: var(--primary-green);
}

.stat-info h3 {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-green);
}

.stat-trend {
    font-size: 12px;
    margin-top: 5px;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    background-color: var(--white);
    border-collapse: collapse;
}

.table th {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--medium-gray);
}

.table tbody tr:hover {
    background-color: var(--pale-green);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background-color: #d4edda;
    color: var(--success);
}

.badge-warning {
    background-color: #fff3cd;
    color: var(--warning);
}

.badge-danger {
    background-color: #f8d7da;
    color: var(--danger);
}

.badge-info {
    background-color: #d1ecf1;
    color: var(--info);
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

/* Search & Filter */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-md);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.page-link {
    padding: 8px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .menu-text {
        display: none;
    }
    
    .sidebar-header h2 {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .menu-item {
        justify-content: center;
        padding: 15px;
    }
    
    .menu-item i {
        margin-right: 0;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
        margin: 20px;
    }
    
    .login-left,
    .login-right {
        padding: 30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .filter-bar {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}