/* Settings sub-page nav bar */

.settings-nav {
    background: #2c3e50;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    max-width: 100%;
}

.settings-nav a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
    padding: 11px 20px;
    font-size: .85rem;
    font-weight: 500;
    display: block;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
}

.settings-nav a:hover {
    background: rgba(255,255,255,.08);
    color: white;
}

.settings-nav a.active {
    color: white;
    border-bottom-color: #3498db;
    background: rgba(255,255,255,.05);
}

/* Member portal layout */

.member-page {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: calc(100vh - 120px);
    background: #f4f7f9;
}

/* Login card */

.login-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    align-self: flex-start;
    margin-top: 2rem;
}

.login-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
    color: #1a3a5c;
}

.login-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

/* Dashboard card */

.dashboard-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    padding: 2rem;
    width: 100%;
    max-width: 720px;
    align-self: flex-start;
}

.avl-edit-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    padding: 2rem;
    width: 100%;
    max-width: 960px;
    align-self: flex-start;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.dashboard-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
    color: #1a3a5c;
}

.dashboard-sub {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Action cards on dashboard */

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #f4f7f9;
    border-radius: 8px;
    text-decoration: none;
    color: #1a3a5c;
    border: 1px solid #dce6f0;
    transition: box-shadow 0.15s, transform 0.15s;
}

.action-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.action-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.action-desc {
    font-size: 0.82rem;
    color: #555;
}

/* Availability edit grid */

.avl-edit-cell {
    cursor: pointer;
    user-select: none;
}

.avl-edit-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.3);
}

.avl-edit-cell:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.avl-instructions {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-link:hover {
    color: #1a3a5c;
}

/* Forms */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.form-group input {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: #2980b9;
}

/* Buttons */

.btn-primary {
    background: #1a6fb5;
    color: #fff;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: #155d9e;
}

.btn-full {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.btn-secondary {
    background: #f0f4f8;
    color: #1a3a5c;
    border: 1px solid #ccd6e0;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-secondary:hover {
    background: #dce6f0;
}

/* Alerts */

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1.1rem;
}

.alert-error {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bee5eb;
}

/* Org-defined dashboard welcome message */

.dashboard-welcome {
    background: #f0f7ff;
    border: 1px solid #b8d4f0;
    border-radius: 6px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #1a3a5c;
}

.dashboard-welcome p { margin: 0 0 0.5rem; }
.dashboard-welcome p:last-child { margin-bottom: 0; }

/* Login back link */

.login-back {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.login-back a {
    color: #1a6fb5;
    text-decoration: none;
}

.login-back a:hover {
    text-decoration: underline;
}

/* Admin styles */

.action-card-admin {
    border-color: #b8d4ee;
    background: #eef5fc;
}

.stat-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.stat-card {
    flex: 1;
    background: #eef5fc;
    border: 1px solid #cfe0f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-inactive {
    background: #fdf3f0;
    border-color: #f5cfc9;
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: #1a3a5c;
}

.stat-label {
    font-size: 0.82rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Admin table */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: #f4f7f9;
    border-bottom: 2px solid #dce6f0;
    font-weight: 600;
    color: #1a3a5c;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #f9fbfd;
}

.row-inactive td {
    color: #999;
}

.row-actions {
    white-space: nowrap;
    text-align: right;
}

.btn-link-sm {
    color: #1a6fb5;
    background: none;
    border: none;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.btn-link-sm:hover {
    text-decoration: underline;
}

.badge-active {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-inactive {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-admin {
    display: inline-block;
    background: #d1ecf1;
    color: #0c5460;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* Form layout */

.form-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
    margin: 1.4rem 0 0.75rem;
    border-bottom: 1px solid #e8ecf0;
    padding-bottom: 0.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 520px) {
    .form-row { grid-template-columns: 1fr; }
    .stat-row { flex-direction: column; }
}

.form-group select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    width: 100%;
}

.input-readonly {
    background: #f4f7f9;
    color: #666;
}

.field-note {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.2rem;
    display: block;
}

.field-required {
    color: #c0392b;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    cursor: pointer;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
