/* ============================================
   MODERN STAFF SCHEDULER - FULLY RESPONSIVE CSS
   Unique Color Palette: Deep Indigo, Teal, Coral
   ============================================ */

/* === CSS Variables for Easy Customization === */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #14b8a6;
    --secondary-dark: #0d9488;
    --accent-color: #f97316;
    --accent-light: #fb923c;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-text: #1f2937;
    --light-text: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Global Reset & Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* === Organization Header === */
.org-header {
    background: var(--bg-gradient);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.org-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.org-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.org-logo {
    width: 100%;
    max-width: 220px;
    max-height: 80px;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
}

.org-logo-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.org-name-container {
    flex: 1;
}

.org-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: white;
    line-height: 1.2;
}

.org-tagline {
    font-size: 0.95rem;
    margin: 0.25rem 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* === Container & Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem 2rem;
}

.page-header {
    background: var(--bg-gradient);
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

/* === Navigation & Links === */
.nav-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* === Forms === */
form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    transition: var(--transition);
}

form:hover {
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.95rem;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form input[type="time"],
form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    color: var(--dark-text);
}

form input:focus,
form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

form input[type="date"],
form input[type="time"],
form select {
    cursor: pointer;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

button[type="submit"] {
    width: auto;
    min-width: 120px;
}

/* === Delete Button === */
.delete-form {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.btn-delete:active {
    transform: translateY(0) scale(1);
}

/* === Tables === */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
}

.table-wrapper table {
    margin-bottom: 0;
    min-width: 800px;
}

th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: var(--transition);
    vertical-align: middle;
}

tr:hover td {
    background: var(--bg-secondary);
}

tr:last-child td {
    border-bottom: none;
}

/* === Photo Cell & Thumbnail === */
.photo-cell {
    padding: 0.5rem;
    text-align: center;
    width: 100px;
}

.checkin-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: var(--transition);
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

.checkin-thumbnail:hover {
    transform: scale(1.15);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* === Photo Modal === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s;
    overflow-y: auto;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 2rem auto;
    padding: 0;
    width: 95%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark-text);
    font-size: 1.25rem;
    font-weight: 700;
    padding-right: 30px;
}

.modal-header p {
    margin: 0;
    color: var(--light-text);
    font-size: 0.9rem;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: var(--light-text);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
}

.modal-close:hover {
    color: var(--dark-text);
    background: #e5e7eb;
    transform: rotate(90deg);
}

#modalPhoto {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 0 12px 12px;
    max-height: 70vh;
    object-fit: contain;
}

/* === Location Display === */
.location-cell {
    min-width: 180px;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.location-coords {
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    line-height: 1.5;
}

.location-coords strong {
    color: var(--primary-color);
    font-weight: 600;
}

.location-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 6px;
    transition: var(--transition);
    width: fit-content;
}

.location-link:hover {
    background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* === Status Indicators === */
.status-late {
    color: var(--danger-color);
    font-weight: 600;
}

.status-ontime {
    color: var(--success-color);
    font-weight: 600;
}

.status-pending {
    color: var(--warning-color);
    font-weight: 600;
    display: inline-block;
    margin-left: 0.25rem;
}

/* === Availability Status Badges === */
.available {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.unavailable {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

/* === Camera Section === */
.camera-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.camera-box {
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 320px;
    height: 240px;
    object-fit: cover;
    margin: 1rem auto;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: block;
}

.camera-box:hover {
    box-shadow: var(--shadow-xl);
    transform: scale(1.02);
}

#snap {
    margin: 1rem 0;
    background: var(--accent-color);
}

#snap:hover {
    background: var(--accent-light);
}

/* === Flash Messages === */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.flash-message {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    animation: slideIn 0.3s ease-out;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === Section Dividers === */
hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
}

/* === Login Page === */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
}

.login-card h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.login-card form {
    padding: 0;
    box-shadow: none;
    margin: 0;
}

.login-card form input {
    margin-bottom: 1.5rem;
}

.login-card .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* === Welcome Header === */
.welcome-header {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-header h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin: 0;
}

/* === Day Checkboxes === */
.days-checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.day-checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.day-checkbox-label:hover {
    background: #f3f4f6;
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.day-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.day-checkbox:checked + .day-checkbox-text {
    color: var(--primary-color);
    font-weight: 600;
}

.day-checkbox-label:has(.day-checkbox:checked) {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.day-checkbox-text {
    font-size: 0.95rem;
    color: var(--dark-text);
    transition: var(--transition);
}

/* ============================================
   TABLET RESPONSIVE (768px - 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .table-wrapper table {
        min-width: 700px;
    }
}

/* ============================================
   TABLET & MOBILE RESPONSIVE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Organization Header */
    .org-header {
        padding: 1rem 1.5rem;
    }

    .org-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .org-logo {
        max-width: 180px;
        max-height: 70px;
    }

    .org-logo-placeholder {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }

    .org-name {
        font-size: 1.5rem;
    }

    .org-tagline {
        font-size: 0.85rem;
    }

    /* Container & Layout */
    .container {
        padding: 0 1rem 1rem 1rem;
    }

    .page-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    /* Navigation */
    .nav-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    /* Forms */
    form {
        padding: 1.5rem;
    }

    form label {
        font-size: 0.9rem;
    }

    form input,
    form select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }

    /* Buttons */
    button[type="submit"],
    .btn {
        width: 100%;
        min-width: auto;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .btn-delete {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 1rem;
    }

    /* Day Checkboxes */
    .days-checkbox-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .day-checkbox-label {
        padding: 0.75rem 1rem;
    }

    .day-checkbox {
        width: 16px;
        height: 16px;
        margin-right: 0.625rem;
    }

    .day-checkbox-text {
        font-size: 0.9rem;
    }

    /* Tables - More compact */
    .table-wrapper {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }

    .table-wrapper table {
        min-width: 600px;
        font-size: 0.8rem;
    }

    th, td {
        padding: 0.625rem 0.375rem;
    }

    th {
        font-size: 0.75rem;
        padding: 0.75rem 0.375rem;
    }

    /* Photo Cell - Even smaller on mobile */
    .photo-cell {
        width: 70px;
        padding: 0.375rem 0.25rem;
    }

    .checkin-thumbnail {
        width: 45px;
        height: 45px;
        border-radius: 6px;
    }

    /* Location Display - Compact */
    .location-cell {
        min-width: 130px;
    }

    .location-coords {
        font-size: 0.7rem;
        padding: 0.35rem;
    }

    .location-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    /* Status Badges - Smaller */
    .status-late,
    .status-ontime {
        font-size: 0.85rem;
    }

    .status-pending {
        font-size: 0.75rem;
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }

    /* Camera Section */
    .camera-section {
        padding: 1.25rem;
    }

    .camera-box {
        height: auto;
        min-height: 180px;
    }

    /* Modal - Full width on small screens */
    .modal {
        padding: 5px;
    }

    .modal-content {
        width: 100%;
        margin: 0.5rem auto;
        border-radius: 8px;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1rem;
        padding-right: 25px;
    }

    .modal-header p {
        font-size: 0.8rem;
    }

    .modal-close {
        font-size: 24px;
        width: 28px;
        height: 28px;
        right: 10px;
        top: 10px;
    }

    #modalPhoto {
        max-height: 65vh;
        border-radius: 0 0 8px 8px;
    }

    /* Flash Messages */
    .flash-messages {
        top: 5px;
        left: 5px;
        right: 5px;
    }

    .flash-message {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    /* Login */
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .login-card h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .login-card .btn {
        padding: 0.875rem;
        font-size: 1rem;
    }

    /* Welcome Header */
    .welcome-header {
        padding: 1rem;
    }

    .welcome-header h2 {
        font-size: 1.35rem;
    }

    /* Section Title */
    .section-title {
        font-size: 1.15rem;
        padding-bottom: 0.5rem;
    }

    .section {
        margin-bottom: 1.75rem;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (max-width: 360px)
   ============================================ */
@media (max-width: 360px) {
    .org-name {
        font-size: 1.1rem;
    }

    .page-header h2 {
        font-size: 1.25rem;
    }

    form {
        padding: 1rem;
    }

    .table-wrapper table {
        min-width: 500px;
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.5rem 0.25rem;
    }

    .photo-cell {
        width: 60px;
    }

    .checkin-thumbnail {
        width: 40px;
        height: 40px;
    }

    .modal-header h3 {
        font-size: 0.95rem;
    }

    .modal-header p {
        font-size: 0.75rem;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION MOBILE
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .org-header {
        padding: 0.75rem 1rem;
    }

    .org-header-content {
        flex-direction: row;
        gap: 1rem;
    }

    .org-logo {
        max-width: 120px;
        max-height: 50px;
    }

    .org-name {
        font-size: 1.25rem;
    }

    .page-header {
        padding: 1rem;
    }

    .modal-content {
        margin: 1rem auto;
    }

    #modalPhoto {
        max-height: 55vh;
    }

    .camera-box {
        min-height: 150px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
    }

    .org-header,
    .nav-links,
    .btn,
    .btn-delete,
    .delete-form,
    .camera-section,
    .modal {
        display: none !important;
    }

    .page-header {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    table {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .table-wrapper {
        overflow: visible;
    }

    .photo-cell,
    .checkin-thumbnail {
        display: none;
    }

    th {
        background: #f3f4f6 !important;
        color: black !important;
    }
}

/* ============================================
   ACCESSIBILITY & UTILITY CLASSES
   ============================================ */
html {
    scroll-behavior: smooth;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
    display: flex;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Image Links */
a[href*="uploads"] {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}



    .day-checkbox-text {
        font-size: 0.85rem;
    }

    /* Tables */
    .table-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }

    .table-wrapper table {
        min-width: 700px;
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    th {
        font-size: 0.8rem;
    }

    /* Photo Cell - Smaller on tablet */
    .photo-cell {
        width: 80px;
        padding: 0.5rem 0.25rem;
    }

    .checkin-thumbnail {
        width: 50px;
        height: 50px;
    }

    /* Location Display */
    .location-cell {
        min-width: 150px;
    }

    .location-coords {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    .location-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    /* Camera Section */
    .camera-section {
        padding: 1.5rem;
    }

    .camera-box {
        max-width: 100%;
        height: auto;
        min-height: 200px;
    }

    /* Modal */
    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 98%;
        margin: 1rem auto;
    }

    .modal-header {
        padding: 1.25rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-header p {
        font-size: 0.85rem;
    }

    #modalPhoto {
        max-height: 60vh;
    }

    /* Flash Messages */
    .flash-messages {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 10px;
    }

    .flash-message {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Login */
    .login-container {
        padding: 1.5rem;
    }

    .login-card {
        padding: 2rem;
    }

    .login-card h2 {
        font-size: 1.75rem;
    }

    /* Welcome Header */
    .welcome-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }

    .welcome-header h2 {
        font-size: 1.5rem;
    }

    /* Section Title */
    .section-title {
        font-size: 1.25rem;
    }

    .section {
        margin-bottom: 2rem;
    }


/* ============================================
   MOBILE RESPONSIVE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Organization Header */
    .org-header {
        padding: 0.875rem 1rem;
    }

    .org-logo {
        max-width: 150px;
        max-height: 60px;
        padding: 0.4rem;
    }

    .org-logo-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .org-name {
        font-size: 1.25rem;
    }

    .org-tagline {
        font-size: 0.8rem;
    }

    /* Container */
    .container {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }

    /* Page Header */
    .page-header {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .page-header h2 {
        font-size: 1.35rem;
    }

    /* Forms */
    form {
        padding: 1.25rem;
    }

    form label {
        font-size: 0.875rem;
        margin-bottom: 0.4rem;
    }

    form input,
    form select {
        font-size: 16px;
        padding: 0.875rem 0.875rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Day Checkboxes - Stack vertically */
    .days-checkbox-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    
   