body {
    font-family: var(--bs-body-font-family, Arial, sans-serif);
    background: #f8f9fa;
    margin: 0;
    padding: 0;
}

main {
    padding: 2em;
}
h1, h2 {
    margin-top: 0;
}
ul {
    list-style: none;
    padding: 0;
}
li {
    margin-bottom: 0.5em;
}

/* Team list styling */
.team-list li {
    background: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.team-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.team-list a {
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
    font-size: 1.1em;
    flex-grow: 1;
}

.team-list .user-count {
    color: #6c757d;
    font-size: 0.9em;
    padding-left: 8px;
}

/* Bootstrap utility overrides or additions can go here if needed */
.schedule-cell {
    width: 100%;
    min-width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}
.schedule-cell.selected {
    outline: 2px solid #999;
    position: relative;
    color: #222;
}
.schedule-cell.selected::before {
    content: "✓";
    position: absolute;
    top: 1.5px;
    left: 1.5px;
    font-size: 10.5px;
    font-weight: bold;
    color: #28a745;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 13.5px;
    height: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}
.schedule-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
}
#schedule-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border-radius: 10px;
    overflow: hidden;
   
    margin-bottom: 2em;
}
.schedule-header, .hour-label {
    background: #2d3237;
    color: #fff;
    font-weight: bold;
    text-align: center;
    border: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    padding: 0.25em 0.2em;
}
.hour-label {
    background: #222 !important;
    color: #fff !important;
}
.bg-100 {
    background: #217a2b !important;
    color: #222;
}
.bg-1st {
    background: #43b047 !important;
    color: #222;
}
.bg-2nd {
    background: #e0e388 !important;
    color: #222;
}
.bg-3rd {
    background: #ffe066 !important;
    color: #222;
}
.bg-red {
    background: #ffb3b3 !important;
    color: #222;
}
.bg-white {
    background: #fff !important;
    color: #222;
}
.schedule-cell .dot {
    width: 12px;
    height: 12px;
    background: #111;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}
.schedule-cell .star {
    position: absolute;
    left: 4px;
    top: 4px;
    font-size: 16px;
    color: gold;
    z-index: 3;
}
.schedule-cell .count {
    position: absolute;
    right: 6px;
    bottom: 2px;
    font-size: 1em;
    font-weight: bold;
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    padding: 0 4px;
    z-index: 3;
    pointer-events: none;
}

/* Team page styling */
.schedule-grid {
    display: grid;
    grid-template-columns: 45px repeat(7, 1fr);
    grid-template-rows: 52.5px repeat(14, 1fr);
    gap: 1.5px;
    background: #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}


.instructions {
    margin-top: 0 !important;
}
.instructions .card {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 0.92em;
    line-height: 1.3;
}

.instructions .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.45rem 0.9rem;
    font-size: 0.96em;
    line-height: 1.25;
}

.instructions .list-group-item:first-child {
    border-top: none;
}

.schedule-header, .schedule-hour, .schedule-cell {
    background: #2d3237;
    text-align: center;
    padding: 0.5em ;
    font-size: 0.95em;
}

/* Cell colors according to specification */
.bg-100 {
    background: #0d5016 !important; /* dark green for 100% selection */
    color: white;
}
.bg-1st {
    background: #90EE90 !important; /* light green for 1st most common */
    color: #222;
}
.bg-2nd {
    background: #FFD700 !important; /* yellow for 2nd most common */
    color: #222;
}
.bg-3rd {
    background: #FFD700 !important; /* yellow for 3rd most common */
    color: #222;
}
.bg-red {
    background: #ffb3b3 !important; /* light red for < 70% */
    color: #222;
}
.bg-white {
    background: #fff !important; /* white for zero selections */
    color: #222;
}

/* Star icon for 100% selection */
.star-count-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    pointer-events: none;
}
.star-icon {
    font-size: 28px;
    color: gold;
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}
.cell-count-on-star {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    color: #222;
    z-index: 3;
    pointer-events: none;
}

/* Cell count display */
.cell-count {
    position: absolute;
    right: 4px;
    bottom: 2px;
    font-size: 10px;
    font-weight: bold;
    background: rgba(255,255,255,0.8);
    border-radius: 3px;
    padding: 1px 3px;
    z-index: 3;
    pointer-events: none;
    min-width: 12px;
    text-align: center;
}

/* Make headers clickable */
.day-header:hover,
.hour-label:hover {
    background-color: #495057 !important;
    cursor: pointer;
}

/* Copy button styling */
.day-header .btn {
    font-size: 10px;
    padding: 2px 6px;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* Password section styling */
#password-form {
    max-width: 500px;
}

.team-password-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

#team-url {
    font-size: 0.9em;
    background-color: #f0f8ff;
}

/* Legend swatch styling for instructions */
.legend-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.legend-swatch.schedule-cell {
    border: 1px solid #ccc;
}

.legend-swatch .star {
    color: gold;
    font-size: 16px;
}

/* Summary schedule grid - smaller, read-only version */
.summary-schedule-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1em;
    width: 100%;
}

.summary-schedule-header, .summary-hour-label {
    background: #2d3237;
    color: #fff;
    font-weight: bold;
    text-align: center;
    border: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 4px 2px;
    min-height: 24px;
}

.summary-hour-label {
    background: #222 !important;
    color: #fff !important;
}

.summary-schedule-cell {
    background: #fff;
    border: 1px solid #ddd;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    font-size: 10px;
    font-weight: bold;
}

.summary-star-icon {
    position: absolute;
    right: 2px;
    top: 2px;
    font-size: 8px;
    color: gold;
    z-index: 3;
    pointer-events: none;
}

/* Blackout cells styling - must override all other states */
.schedule-cell.blackout,
.schedule-cell.blackout.selected,
.schedule-cell.bg-blackout,
.schedule-cell.bg-blackout.selected {
    background: #000 !important;
    color: #fff !important;
    cursor: pointer !important;
}

.schedule-cell.blackout::before,
.schedule-cell.blackout.selected::before {
    content: "" !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
    color: #fff !important;
    z-index: 10;
    pointer-events: none;
    background: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* Blackout cells in summary grid */
.summary-schedule-cell.bg-blackout {
    background: #000 !important;
    color: #fff;
}
