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

/* Global */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fc;
    margin: 0;
    padding: 0;
    color: #374151;
}

.container {
    max-width: 1200px;
    margin: auto;
}
/* Gloabl ends here */


/* LOGIN PAGE STARTS HERE */
.login-page .blue-shadow:hover { /* Blue shadow hover effect for login page */
    -webkit-transition-duration: 0.8s;
    transition-duration: 0.8s;
    box-shadow: 0 12px 16px 0 rgba(140,140,140,0.24), 0 17px 50px 0 rgba(140,140,140,0.19);
}

/* Smaller input font size for login page */
.login-page .form-control-lg {
    font-size: 0.95rem !important;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

/* Register link uses primary color, including underline - login page specific */
.login-page .link-info {
    color: var(--bs-primary) !important;
    font-weight: 500;
    text-decoration-color: var(--bs-primary) !important;
}

.login-page .link-info:hover {
    color: var(--bs-primary) !important;
    text-decoration-color: var(--bs-primary) !important;
    text-decoration: underline;
}

/* Sharper, smaller login button - specific to login page */
.login-page .login-btn {
    width: 40%;
    max-width: 200px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.login-page .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

/* Prevent layout shift from error message - login page specific */
.login-page .validation-space {
    height: 1.5rem;
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.login-page .validation-space p {
    margin: 0;
    line-height: 1.5rem;
}
/* LOGIN PAGE ENDS HERE */



/* CSS FOR HEADER FILE */
#logo {
    margin-right: 8px;
    margin-left: 2rem;
}

.navbar .clinic-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 100;
    padding: 0.8rem 0;     
    padding-left: 0.4rem;              
    font-size: 1rem;                     
    color: #ffffff;                    
    text-decoration: none;                          
}

.navbar {
    background-color: #BDB76B !important;
    padding: 0.8rem 0;
}

.navbar .dropdown-menu.dropdown-menu-end.account-menu {
    position: fixed;
    right: -6px;
    top: 60px;
    margin: 0;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.navbar .nav-link,
.navbar-brand,
.navbar .dropdown-menu a {
    color: #ffffff !important;
}

.navbar .nav-link:hover {
    color: #052c6e !important;
}

.navbar .nav-link.no-hover:hover {
    color: #ffffff;
    text-decoration: none;
}

.navbar .nav-separator {
    display: inline-block;
    width: 1px;
    height: 24px;
    background-color: #ffffff;
    margin: 0 8px;
    vertical-align: middle;
}

/* Active nav link styling */
.navbar .nav-link.active,
.navbar .dropdown-toggle.active {
    color: #052c6e !important;
    border-bottom: 2px solid #052c6e;
    padding-bottom: 5px;
}

/* Make sure dropdown toggle doesn't get double styling */
.navbar .dropdown-toggle.active {
    display: inline-block;
}
/* END OF CSS FOR HEADER FILES */

/* Titles */
header.main-title {
    background-color: #4a5aef;
    padding: 20px;
    text-align: center;
    margin: 0;
}

header.main-title h1 {
    font-family: 'Tinos', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

h2, h3, h4 {
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
    border-left: 4px solid #0c3c8f;
    padding-left: 10px;
}

/* Inventory Section */
.inventory-section {
    margin-top: 30px;
}

.inventory-section-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: none;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-bar input {
    border: none;
    outline: none;
    margin-left: 8px;
    font-size: 0.95rem;
    background: transparent;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-group select {
    border: none;
    outline: none;
    margin-left: 5px;
    font-size: 0.9rem;
    background: transparent;
}

.inventory-item {
    height: 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-size: 14px;
}

.inventory-item.header,
.table thead {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #374151;
}

.inventory-item.header {
    font-weight: 600;
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
}

.inventory-item .item-name {
    text-align: left;
}

.inventory-item:last-child {
    border-bottom: none;
}

.inventory-item:hover,
.table tbody tr:hover {
    background-color: rgb(224, 237, 241);
}

button[aria-expanded="true"] .material-icons-sharp {
    transform: rotate(180deg);
    transition: transform 0.3s;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag.in-stock { background-color: #dcfce7; color: #15803d; }
.tag.low-stock { background-color: #fff4de; color: #ec8739; }
.tag.out-of-stock { background-color: #fee2e2; color: #b91c1c; }

/* Buttons */
.btn-primary {
    background-color: #4a5aef !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 6px 14px !important;
    font-weight: 500 !important;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-danger {
    background-color: #CE2029 !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.inventory .bg-warning {
    background-color: #e0650e !important;
}

#delete {
    background-color: #CE2029;
}

/* Table Styles */
.table td, 
.table th {
    border: none !important;
    vertical-align: middle;
    height: 60px;
    padding: 0.75rem !important;
}

.table tbody tr,
.table thead tr {
    height: 60px;
}

.table {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Main grouped rows */
table.table tr.main-row,
.table tbody tr.main-row {
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px solid lightgrey;
    border-left: 4px solid #0c3c8f;
    transition: background-color 0.2s ease;
}

.table tbody tr.main-row td {
    background-color: white !important;
}

.table tbody tr:not(.main-row):nth-of-type(odd) td,
.table tbody tr:not(.main-row):nth-of-type(even) td {
    background-color: #ffffff !important;
}

.table tbody tr:hover td {
    background-color: rgb(224, 237, 241) !important;
}

.table .main-row:hover {
    background-color: #f9fafb;
}

.table .sub-row {
    background-color: white !important;
    border-left: 4px solid #d1d5db;
}

/* Action Buttons */
.dropdown-menu .action-warning {
    background-color: #fff8db !important;     /* soft yellow */
    color: #8a6d00 !important;
}

.dropdown-menu .action-primary {
    background-color: #e7f1ff !important;     /* soft blue */
    color: #084298 !important;
}

.dropdown-menu .action-danger {
    background-color: #ffe7e7 !important;      /* soft red */
    color: #b32020 !important;
}

.dropdown-menu li + li {
    margin-top: 2px;
}

/* Hover states (slightly darker) */
.dropdown-menu .action-warning:hover {
    background-color: #fff2b3 !important;
}

.dropdown-menu .action-primary:hover {
    background-color: #d6e8ff !important;
}

.dropdown-menu .action-danger:hover {
    background-color: #ffd6d6 !important;
}

/* Pharmacist Modals */
.saveModal .modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

.saveModal .modal-body,
.saveModal table,
.saveModal thead,
.saveModal th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
}

.saveModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.saveModal .modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.saveModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.saveModal .table {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

/* ==================== PLACEHOLDER STYLING ==================== */
/* Standard placeholder styling */
input::placeholder,
textarea::placeholder,
select::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-style: italic;
}

/* Firefox */
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #9ca3af;
    opacity: 1;
    font-style: italic;
}

/* Internet Explorer 10-11 */
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Microsoft Edge */
input::-ms-input-placeholder,
textarea::-ms-input-placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Ensure actual input text is black and not italic */
input,
textarea,
select {
    color: #000000;
    font-style: normal;
}

/* Make sure focused inputs also have black text */
input:focus,
textarea:focus,
select:focus {
    color: #000000;
    font-style: normal;
}

/* Card Styles */
.card {
    margin: 0 auto;
    margin-top: 2%;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 0;
}

.card > .container {
    padding: 1.5rem 2rem;
}

.card .container .container {
    padding: 0;
}

.card h4 {
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
}

.card + .card {
    margin-top: 2rem;
}

.card.col-md-10 {
    max-width: 83.333333%;
}

.card.col-md-10.mt-4 {
    margin-top: 1.5rem !important;
}

h4[style*="padding-top"] {
    padding-top: 0 !important;
}

/* Accordion */
.accordion {
    margin-top: 1rem !important;
}

.accordion-button {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
}

.accordion-body {
    padding: 1.25rem;
}

#treatmentAccordion .accordion-item:last-child {
    margin-bottom: 0;
}

/* Modal Spacing */
.modal-header {
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
}

#addResourceModal .modal-body {
    max-height: 400px;
    overflow-y: auto;
}

/* Form Spacing */
.mb-3 {
    margin-bottom: 1rem !important;
}

form .row {
    margin-bottom: 0.75rem;
}

/* Button Groups */
.d-flex.gap-2 {
    gap: 0.5rem !important;
}

/* Dashboard Cards */
.dashboard {
    display: flex;
    padding: 1.5rem 0;
    gap: 1.5rem;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.status-card.low-stock {
    flex: 1;
    min-width: 280px;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    transition: all 0.3s ease;
}

.status-card.low-stock.expanded {
    padding-bottom: 8rem;
}

.status-card.low-stock:hover {
    background-color: #f9fafb;
}

.status-card.low-stock .card-info h3 {
    color: #374151;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.status-card.low-stock .card-info .count {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: #1f2937;
}

.status-card.low-stock .card-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #fff4de;
    padding: 0.5rem;
    border-radius: 50%;
}

.status-card.low-stock .card-settings {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    cursor: pointer;
    transition: transform 0.5s ease, color 0.5s ease;
    z-index: 10;
}

.status-card.low-stock .card-settings:hover {
    color: #4a5aef;
    transform: rotate(30deg);
}

.status-card.low-stock .threshold-settings {
    position: absolute;
    bottom: 1rem;
    left: 1.5rem;
    right: 1.5rem;
    padding: 0;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.status-card.low-stock .threshold-settings.open {
    max-height: 150px;
    opacity: 1;
    padding-top: 1rem;
}

.status-card.low-stock .threshold-settings label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

.status-card.low-stock .threshold-settings input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.status-card.low-stock .threshold-settings button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    background-color: #0c3c8f;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.status-card.low-stock .threshold-settings button:hover {
    background-color: #0b79c1;
}

/* Border colors for card types */
.status-card.card-expiring {
    border-left: 6px solid #fbbf24;
}

.status-card.card-expired {
    border-left: 6px solid #ef4444;
}

.status-card.card-low-stock {
    border-left: 6px solid #f97316;
}

.status-card.card-out-stock {
    border-left: 6px solid #dc2626;
}

/* Sticky Headers */
.sticky-header {
    padding: 1rem 1.5rem !important;
    margin: 0 0 1rem 0;
    border-radius: 0;
}

.sticky-header h4 {
    margin: 0;
    padding: 0;
}

/* Staff Page Specific */
.staff-invites .table,
#therapist_tbody {
    margin-top: 0.5rem;
}

/* Alert Spacing */
.alert {
    margin: 1rem 1.5rem;
}

/* Search and Filter Controls */
.inventory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    margin-bottom: 1rem !important;
    flex-wrap: wrap;
    gap: 15px;
}

/* Chart Container */
.card .container.col-md-10 {
    padding: 1rem 0;
}

/* Container Width Adjustments */
.container.col-md-12,
.container.col-md-10 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Section Spacing */
h4, h5, h6 {
    margin-bottom: 1.25rem;
}
