/* ==========================================================================
   Umpire Scheduler — Front-End Styles
   ========================================================================== */

/* Layout */
.us-dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Navigation */
.us-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 30px;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 6px;
}

.us-nav-link {
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.us-nav-link:hover {
    background: #e0e0e0;
    color: #000;
}

.us-nav-link.active {
    background: #0073aa;
    color: #fff;
}

/* Cards */
.us-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.us-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.us-card h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.us-card-number {
    font-size: 36px;
    font-weight: 700;
    color: #0073aa;
    margin: 0 0 8px 0;
}

.us-card-link {
    font-size: 14px;
    color: #0073aa;
    text-decoration: none;
}

.us-card-link:hover {
    text-decoration: underline;
}

/* Status indicators */
.us-status {
    font-size: 16px;
    font-weight: 600;
    margin: 8px 0;
}

.us-status-ok {
    color: #46b450;
}

.us-status-warning {
    color: #ffb900;
}

.us-status-error {
    color: #dc3232;
}

/* Tables */
.us-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.us-table thead th {
    background: #f7f7f7;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.us-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

.us-table tbody tr:hover {
    background: #f9f9f9;
}

/* Badges */
.us-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.us-badge-assigned {
    background: #fff3cd;
    color: #856404;
}

.us-badge-confirmed {
    background: #d4edda;
    color: #155724;
}

.us-badge-declined {
    background: #f8d7da;
    color: #721c24;
}

.us-badge-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.us-badge-paid {
    background: #d4edda;
    color: #155724;
}

.us-badge-pending {
    background: #fff3cd;
    color: #856404;
}

.us-badge-failed {
    background: #f8d7da;
    color: #721c24;
}

/* Buttons */
.us-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.4;
}

.us-btn:hover {
    transform: translateY(-1px);
}

.us-btn:active {
    transform: translateY(0);
}

.us-btn-primary {
    background: #0073aa;
    color: #fff;
}

.us-btn-primary:hover {
    background: #005d8c;
    color: #fff;
}

.us-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.us-btn-secondary:hover {
    background: #e0e0e0;
}

.us-btn-success {
    background: #46b450;
    color: #fff;
}

.us-btn-success:hover {
    background: #3a9a42;
    color: #fff;
}

.us-btn-danger {
    background: #dc3232;
    color: #fff;
}

.us-btn-danger:hover {
    background: #c22;
    color: #fff;
}

.us-btn-small {
    padding: 5px 12px;
    font-size: 12px;
}

/* Forms */
.us-form-wrap {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.us-form-wrap h2 {
    margin: 0 0 20px 0;
    text-align: center;
}

.us-form {
    width: 100%;
}

.us-form-row {
    margin-bottom: 16px;
}

.us-form-row label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.us-form-row label .required {
    color: #dc3232;
}

.us-form-row input[type="text"],
.us-form-row input[type="email"],
.us-form-row input[type="tel"],
.us-form-row input[type="password"],
.us-form-row input[type="number"],
.us-form-row input[type="date"],
.us-form-row input[type="time"],
.us-form-row select,
.us-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.us-form-row input:focus,
.us-form-row select:focus,
.us-form-row textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.us-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.us-form-row-third {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

.us-form-footer {
    text-align: center;
    font-size: 14px;
    margin-top: 16px;
    color: #666;
}

.us-form-footer a {
    color: #0073aa;
}

.us-help-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* Notices */
.us-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.us-notice p {
    margin: 0;
}

.us-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.us-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.us-notice-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.us-notice-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Empty state */
.us-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.us-empty-state a {
    color: #0073aa;
}

/* Availability Grid */
.us-availability-grid {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.us-availability-grid thead th {
    background: #f7f7f7;
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.us-availability-grid tbody td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.us-slot-label {
    text-align: left !important;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
    padding-left: 12px !important;
}

.us-slot-cell {
    cursor: pointer;
}

.us-checkbox-label {
    display: inline-block;
    cursor: pointer;
    position: relative;
    width: 28px;
    height: 28px;
}

.us-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.us-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 28px;
    width: 28px;
    background-color: #f0f0f0;
    border-radius: 6px;
    transition: all 0.2s;
    border: 2px solid #ddd;
}

.us-checkbox-label:hover .us-checkmark {
    background-color: #e0e0e0;
}

.us-checkbox-label input:checked ~ .us-checkmark {
    background-color: #46b450;
    border-color: #3a9a42;
}

.us-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.us-checkbox-label input:checked ~ .us-checkmark:after {
    display: block;
    left: 9px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Responsive */
@media (max-width: 768px) {
    .us-dashboard {
        padding: 10px;
    }

    .us-nav {
        flex-direction: column;
    }

    .us-dashboard-cards {
        grid-template-columns: 1fr;
    }

    .us-table {
        font-size: 13px;
    }

    .us-table thead th,
    .us-table tbody td {
        padding: 8px 10px;
    }

    .us-form-row-half,
    .us-form-row-third {
        grid-template-columns: 1fr;
    }

    .us-availability-grid {
        font-size: 12px;
    }

    .us-availability-grid thead th {
        padding: 6px 4px;
        font-size: 11px;
    }

    .us-btn-small {
        display: block;
        margin-bottom: 4px;
        text-align: center;
    }
}
