/* Buttons */
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
    background: #3b82f6;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

button:hover {
    background: #2563eb;
}

button:active {
    background: #1d4ed8;
}

button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    color: #475569;
    background: #fff;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-secondary:active {
    background: #f1f5f9;
}


.btn-warning {
    color: #e5cd02;
    background: white;
    border-color: #ffdf76;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.3rem;
}

.btn-warning:hover {
  background: #fff7db;
  border-color: #ffd24a;
}

.btn-warning:active {
  background: #ffefbd;
  border-color: #ffc82f;
}

form:has(.btn-search) {
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
}

.btn-search {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
    border-radius: 0.3rem;
    aspect-ratio: 1;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    align-self: stretch;
}

.btn-search:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.btn-search:active {
    background: #bfdbfe;
}

.btn-danger {
    color: #8f0b0b;
    background: white;
    border-color: #fca5a5;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.3rem;
}

.btn-danger:hover {
    background: #fecaca;
    border-color: #f87171;
}

.btn-danger:active {
    background: #fca5a5;
}

.btn-add {
    background: white;
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.btn-add.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

.btn-add:hover {
    background: #dbeafe;
    border-color: #2563eb;
}

.btn-add:active {
    background: #bfdbfe;
    border-color: #1d4ed8;
}

.btn-success {
    background: #16a34a;
}

.btn-success:hover {
    background: #15803d;
}

.btn-success:active {
    background: #166534;
}

/* Small button modifier */
.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.3rem;
}

.btn-teal {
    color: #0f766e;
    background: #fff;
    border-color: #99f6e4;
}

.btn-teal:hover {
    background: #f0fdf4;
    border-color: #6ee7b7;
}

.btn-teal:active {
    background: #d1fae5;
}

/* Anchor styled as button */
a.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
    color: #475569;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s;
}

a.button-link:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

a.button-link.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.3rem;
}

/* Login form */
.login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Form groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Messages */
.error-message {
    padding: 10px;
    margin-bottom: 15px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

#login-footer {
    margin: auto;
    max-width: 25%;
    text-align: center;
    font-size: 11px;
    padding-top: 5px;
}

/* Selects */
select {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

select:hover {
    border-color: #94a3b8;
}

select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* Text inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="tel"] {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="search"]:hover,
input[type="number"]:hover,
input[type="url"]:hover,
input[type="tel"]:hover {
    border-color: #94a3b8;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

input[type="text"]:disabled,
input[type="password"]:disabled,
input[type="email"]:disabled,
input[type="search"]:disabled,
input[type="number"]:disabled,
input[type="url"]:disabled,
input[type="tel"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* Inputs */
.TextBox {
    border-radius: 0.2em;
}

#fileUpload {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-family: inherit;
    color: #475569;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#fileUpload:hover {
    border-color: #94a3b8;
}

#fileUpload:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

#fileUpload::file-selector-button {
    padding: 0.25rem 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.3rem;
    cursor: pointer;
    margin-right: 0.75rem;
    transition: background-color 0.15s, border-color 0.15s;
}

#fileUpload::file-selector-button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}
