/* Add base font size at the top */
html, body {
    font-size: 12px !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Buefy/Bulma primary color customization */
:root {
    --primary: #2596be !important;
}

.is-primary {
    background-color: #2596be !important;
}

.is-primary:hover {
    background-color: #1f85aa !important;
}

.has-text-primary {
    color: #2596be !important;
}

.input:focus, 
.input.is-focused,
.input:active, 
.input.is-active,
.textarea:focus,
.textarea.is-focused,
.textarea:active,
.textarea.is-active,
.select select:focus,
.select select.is-focused,
.select select:active,
.select select.is-active {
    border-color: #2596be !important;
    box-shadow: 0 0 0 0.125em rgba(37, 150, 190, 0.25) !important;
}

a {
    color: #2596be !important;
}

a:hover {
    color: #1f85aa !important;
}

.navbar-item.is-active {
    background-color: #2596be !important;
    color: #fff !important;
}

.menu-item.is-active {
    background-color: #2596be !important;
}

.pagination-link.is-current {
    background-color: #2596be !important;
    border-color: #2596be !important;
}

.tabs li.is-active a {
    border-bottom-color: #2596be !important;
    color: #2596be !important;
}

.field.is-horizontal {
    align-items: center;
}

.field.is-horizontal .field-label {
    flex-grow: 0;
    min-width: 120px;
}

.box {
    margin-top: 1.5rem;
    background-color: #f5f5f5;
}

/* Fixed Header Styles */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: white;
    z-index: 1000;
    box-shadow: none !important;
    border-bottom: none !important;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-title {
    font-size: 2rem !important; /* Reduced from 1.25rem */
    color: #2596be !important;
    flex-grow: 1;
}

.header-actions {
    margin-left: auto;
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-icon {
    color: #2596be !important;
    font-size: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.header-icon:hover {
    background-color: rgba(37, 150, 190, 0.1) !important;
}

/* MDI Icons */
.mdi-account-circle:before {
    content: "\F0009";
}

.mdi-logout:before {
    content: "\F0343";
}

.mdi-logout-variant:before {
    content: "\F05FD";
}

.mdi-home:before {
    content: "\F02DC";
}

/* Page Background and Content Spacing */
body {
    background-color: #E6ECF2 !important;
    padding-top: 60px !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Adjust login page specific styles */
.hero.is-fullheight {
    min-height: calc(100vh - 60px) !important;
}

/* Card/Box styling updates */
.card:not(.fixed-header), .box:not(.fixed-header) {
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Adjust specific element sizes proportionally */
.title {
    font-size: 1.5rem !important; /* Reduced from default */
}

.subtitle {
    font-size: 1.1rem !important; /* Reduced from default */
}

.card-header-title {
    font-size: 1.1rem !important;
}

/* Make sections fill available space */
.section {
    flex: 1 !important;
    min-height: calc(100vh - 60px) !important; /* Subtract header height */
}

/* Container adjustments */
.container {
    height: 100% !important;
}

/* Form validation error messages */
.help.is-danger {
    color: #ff3860 !important;
}

.field.is-danger .help {
    color: #ff3860 !important;
}

.message.is-danger .message-body {
    color: #ff3860 !important;
}

/* Input field error state */
.field.is-danger .input,
.field.is-danger .select select,
.field.is-danger .textarea {
    border-color: #ff3860 !important;
}

/* Error text color for all validation messages */
.has-text-danger {
    color: #ff3860 !important;
}

/* Make active tabs bolder and add background */
.b-tabs .tab-item.is-active {
    font-weight: 700 !important;
    color: #2596be !important;
    background-color: #f5f5f5 !important;
    border-radius: 4px 4px 0 0 !important;
}

.b-tabs .tab-item.is-active a {
    font-weight: 700 !important;
    color: #2596be !important;
    border-bottom-width: 3px !important;
    background-color: #f5f5f5 !important;
    border-radius: 4px 4px 0 0 !important;
}

/* Ensure non-active tabs are normal weight with white background */
.b-tabs .tab-item {
    font-weight: normal;
    background-color: white !important;
    transition: background-color 0.3s ease;
}

/* Add hover effect for non-active tabs */
.b-tabs .tab-item:not(.is-active):hover {
    background-color: #fafafa !important;
}

/* Tab styling with more specific selectors */
.b-tabs nav.tabs .tab-item.is-active {
    font-weight: 700 !important;
    color: #2596be !important;
    background-color: #f5f5f5 !important;
    border-radius: 4px 4px 0 0 !important;
    padding: 0.5em 1em !important;
}

.b-tabs nav.tabs .tab-item.is-active a {
    font-weight: 700 !important;
    color: #2596be !important;
    border-bottom-width: 3px !important;
    background-color: #f5f5f5 !important;
    border-radius: 4px 4px 0 0 !important;
}

/* Ensure non-active tabs are normal weight with white background */
.b-tabs nav.tabs .tab-item {
    font-weight: normal !important;
    background-color: white !important;
    transition: background-color 0.3s ease !important;
    padding: 0.5em 1em !important;
}

/* Add hover effect for non-active tabs */
.b-tabs nav.tabs .tab-item:not(.is-active):hover {
    background-color: #fafafa !important;
}

/* Remove tab content background */
.b-tabs .tab-content {
    padding: 1em 0 !important;  /* Keep padding but remove background */
}

.table tfoot {
    display: table-header-group;
  }
  .table tfoot tr {
    display: table-row;
  }
  .table tfoot td {
    display: table-cell;
    width: auto;
  }