/* pacific_hospital_app/css/style.css */

/* === 1. CSS Reset & Global Box-Sizing === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === 2. Global Typography & Body Styles === */
:root {
    font-size: 16px; /* Base font size for rem units */
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5; /* Light grey background for all pages */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

/* === 3. Button Styles === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem; /* 12px 24px */
    font-size: 1rem; /* 16px */
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 0.375rem; /* 6px */
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #004085;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}
.btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}
.btn-warning:hover {
    color: #212529;
    background-color: #e0a800;
    border-color: #cc9b00;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}
.btn-danger:hover {
    color: #fff;
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}
.btn-info:hover {
    color: #fff;
    background-color: #138496;
    border-color: #117a8b;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}
.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-link {
    font-weight: 400;
    color: #007bff;
    background-color: transparent;
    border-color: transparent;
    padding: 0;
    font-size: 1rem;
}
.btn-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* === 4. Form Styles === */
.form-group {
    margin-bottom: 1rem; /* 16px */
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem; /* 8px */
    font-weight: 600;
    color: #555;
    font-size: 0.95rem; /* 15.2px */
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem; /* 10px 12px */
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem; /* 4px */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.2-6.5H18.4c-4.9%200-9.4%201.8-13.2%206.5-3.8%203.8-5.7%208.7-5.7%2013.8v160.8c0%205.1%201.9%2010%205.7%2013.8a17.6%2017.6%200%200%200%2013.2%206.5H273.8c4.9%200%209.4-1.8%2013.2-6.5a17.6%2017.6%200%200%200%205.7-13.8V83.2c0-5.1-1.9-10-5.7-13.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.625rem 0.625rem; /* 10px 10px */
}

.required {
    color: #dc3545; /* Red asterisk */
    margin-left: 0.125rem; /* 2px */
}

.info-text {
    font-size: 0.875rem; /* 14px */
    color: #6c757d;
    margin-top: 0.25rem; /* 4px */
    display: block;
}

.form-grid {
    display: grid;
    gap: 1.25rem; /* 20px */
    grid-template-columns: 1fr; /* Default to single column for mobile */
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Two or more columns on larger screens */
    }
    .form-grid .full-width {
        grid-column: 1 / -1; /* Make an item span all columns */
    }
}


/* === 5. Message/Alert Styles === */
.message {
    padding: 0.75rem 1.25rem; /* 12px 20px */
    margin-bottom: 1rem; /* 16px */
    border: 1px solid transparent;
    border-radius: 0.25rem; /* 4px */
    font-size: 0.95rem; /* 15.2px */
}

.message.success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.message.error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.message.info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}


/* === 6. Login/Register Page Specific Styles === */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #a8d8ea 0%, #7dc9e6 100%); /* Blue gradient background */
    padding: 1rem;
}

.auth-card {
    background-color: #fff;
    border-radius: 0.75rem; /* 12px */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* Stronger shadow for depth */
    padding: 2.5rem; /* 40px */
    width: 100%;
    max-width: 450px; /* Max width for auth forms */
    text-align: center;
}

.auth-card h2 {
    color: #007bff;
    font-size: 2rem; /* 32px */
    margin-bottom: 1.5rem; /* 24px */
    font-weight: 700;
}

.auth-card .form-group {
    text-align: left;
}

.auth-card button[type="submit"] {
    width: 100%;
    margin-top: 1rem; /* 16px */
}

.auth-card .bottom-link {
    margin-top: 1.5rem; /* 24px */
    font-size: 0.95rem; /* 15.2px */
}

.auth-card .bottom-link a {
    font-weight: 600;
}

/* Add any other utility classes as needed */

/* Table styles for generic use (can be refined in dashboard.css) */
.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    min-width: 600px; /* Ensure table is readable on smaller screens before overflow */
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    white-space: nowrap; /* Prevent headers from wrapping too much */
}

table tbody tr:hover {
    background-color: #f0f8ff;
}

table tbody tr:last-child td {
    border-bottom: none;
}