* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 로그인 페이지 */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: #2a2a2a;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 200px;
    height: auto;
}

.login-box h1 {
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
    color: #d34a44;
}

.login-box h2 {
    font-size: 20px;
    margin-bottom: 30px;
    text-align: center;
    color: #9a9a9a;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 16px;
    background-color: #333;
    color: #e0e0e0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e85a54;
    box-shadow: 0 0 0 2px rgba(232, 90, 84, 0.2);
}

/* 체크박스 스타일 */
.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background-color: #d34a44;
    color: white;
}

.btn-primary:hover {
    background-color: #b73833;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* 알림 메시지 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid;
}

.alert-success {
    background-color: #1a3d2e;
    color: #4ade80;
    border-color: #22c55e;
}

.alert-danger {
    background-color: #3d1a1a;
    color: #ef4444;
    border-color: #dc2626;
}

.alert-info {
    background-color: #1a2d3d;
    color: #3b82f6;
    border-color: #2563eb;
}

/* 헤더 */
.header {
    background-color: #d34a44;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
    position: relative;
}

.header-content {
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: opacity 0.3s ease;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo {
    height: 40px;
    width: auto;
}

.header h1 {
    font-size: 24px;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(0,0,0,0.1);
}

.nav-menu a.active {
    background-color: rgba(0,0,0,0.2);
}

/* 햄버거 메뉴 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 10000;
    padding: 10px;
    margin-right: -10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 모바일 사이드바 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: #2c2c2c;
    transition: right 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.5);
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-header {
    padding: 20px;
    background-color: #d34a44;
    color: white;
}

.mobile-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.mobile-sidebar-content {
    padding: 20px;
    padding-bottom: 50px;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    margin-bottom: 10px;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 15px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 15px;
    border: 1px solid transparent;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background-color: #d34a44;
    transform: translateX(-5px);
    box-shadow: 0 2px 8px rgba(211, 74, 68, 0.3);
}

.mobile-sidebar-content .user-info {
    color: #fff;
    padding: 15px;
    border-bottom: 1px solid #444;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

.mobile-sidebar-content .user-info strong {
    color: #fff;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

/* 오버레이 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 9998;
    backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
    display: block;
}

/* 캘린더 스타일 */
.calendar-container {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header .btn {
    width: auto;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #444;
    border: 1px solid #444;
}

.calendar-day-header {
    background-color: #d34a44;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.calendar-day {
    background-color: #333;
    min-height: 100px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    border: 1px solid #444;
}

.calendar-day:hover {
    background-color: #3a3a3a;
}

.calendar-day-today:hover {
    background-color: #5a5a4a;
    border-color: #ff9800;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-day-other {
    background-color: #222;
    color: #666;
}

.calendar-day-today {
    background-color: #4a4a3a;
    border: 2px solid #ffa726;
    position: relative;
}

.calendar-day-today .calendar-day-number {
    color: #ff7043;
    font-weight: bold;
    font-size: 16px;
}

.calendar-day-today::before {
    content: '오늘';
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #ff5722;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

/* 휴무일 스타일 */
.calendar-day-holiday {
    background-color: #3d2020;
    border: 1px solid #ef5350;
    cursor: not-allowed !important;
    opacity: 0.8;
}

.calendar-day-holiday:hover {
    background-color: #4d2525;
    cursor: not-allowed !important;
}

.holiday-badge {
    background-color: #f44336;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin: 2px 0;
    text-align: center;
}

.holiday-badge span {
    font-size: 10px;
}

/* 예약 아이템 */
.reservation-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reservation-item {
    background-color: #d34a44;
    color: white;
    padding: 2px 5px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.reservation-item.reservation-more {
    background-color: #b93a32;
    font-weight: bold;
}

/* 일일 스케줄 뷰 */
.daily-schedule {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.schedule-table {
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
}

.time-slot {
    border-bottom: 1px solid #333;
    display: flex;
    min-height: 60px;
    position: relative;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-label {
    width: 100px;
    padding: 15px;
    font-weight: bold;
    color: #9a9a9a;
    background-color: #222;
    border-right: 1px solid #333;
    display: flex;
    align-items: center;
}

.slot-content {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.slot-available {
    color: #4ade80;
    font-weight: 500;
}

.slot-occupied {
    background-color: #3d2020;
}

.slot-occupied .slot-content {
    background-color: #3d2020;
}

.slot-lunch {
    background-color: #252525;
}

.slot-lunch .slot-content {
    background-color: #252525;
}

.slot-unavailable {
    color: #666;
    font-style: italic;
}

.reservation-info {
    background-color: #d34a44;
    color: white;
    padding: 15px;
    border-radius: 4px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reservation-info strong {
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

.btn-small {
    padding: 3px 8px;
    font-size: 12px;
}

.btn {
    width: auto;
}

.login-box .btn {
    width: 100%;
}

.form-group .btn {
    width: 100%;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background-color: #2a2a2a;
    margin: 20px auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #333;
    color: #e0e0e0;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #9a9a9a;
}

.modal-close:hover {
    color: #e0e0e0;
}

.modal-content .btn {
    width: auto;
    margin-right: 10px;
}

/* 테이블 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
    color: #e0e0e0;
}

/* Fix for white background elements text readability */
.reservation-card {
    background-color: white;
    color: #333;
}

.stat-card,
.today-reservations,
.user-info-box,
.reservation-table {
    color: #333;
}

/* Fix text colors on white backgrounds for better contrast */
/* Tables on white backgrounds */
.table-responsive table,
div[style*="background: white"] table,
div[style*="background: #fff"] table,
div[style*="background-color: white"] table,
div[style*="background-color: #fff"] table {
}

/* Table cells and headers on white backgrounds */
div[style*="background: white"] table td,
div[style*="background: white"] table th,
div[style*="background: #fff"] table td,
div[style*="background: #fff"] table th {
    border-color: #ddd;
}

/* Form controls on white backgrounds */
div[style*="background: white"] .form-control,
div[style*="background: white"] input,
div[style*="background: white"] select,
div[style*="background: white"] textarea,
div[style*="background: white"] label {
    border-color: #ccc;
}

/* Paragraphs and text on white backgrounds */
div[style*="background: white"] p,
div[style*="background: white"] span,
div[style*="background: white"] .form-text,
div[style*="background: white"] small {
    color: #333;
}

/* Fix specific admin dashboard elements */
.stat-card h3 {
    color: #333;
}

.stat-description {
    color: #666;
}

.menu-card-body p {
    color: #333;
}

.reservations-table th {
    color: #333;
    background: #fafbfc;
}

.reservations-table td {
    color: #333;
}

/* Fix manage holidays page */
div[style*="background: white"] h3 {
    color: #333;
}

/* Fix admin services page */
.table-responsive .table td,
.table-responsive .table th {
}

/* Modal content should keep dark theme */
.modal-content .reservation-details,
.modal-content .reservation-info {
    color: #e0e0e0;
}

.modal-content .reservation-details strong,
.modal-content .reservation-info strong {
    color: #fff;
    font-weight: 600;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.table th {
    background-color: #d34a44;
    color: white;
    font-weight: bold;
}

/* Override table colors for white background containers */
div[style*="background: white"] .table th {
    background-color: #f8f9fa;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

div[style*="background: white"] .table td {
    border-bottom: 1px solid #dee2e6;
}

div[style*="background: white"] .table tr:hover {
    background-color: #f8f9fa;
}

.table tr:hover {
    background-color: #333;
}

/* 유틸리티 클래스 */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.btn + .btn {
    margin-left: 5px;
}

/* 테이블 내 버튼 */
.table .btn {
    padding: 4px 8px;
    font-size: 13px;
    margin: 0 2px;
    display: inline-block;
}

/* 반응형 테이블 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.table-responsive table {
    min-width: 600px;
}

/* 모바일 숨김 */
@media (max-width: 600px) {
    .hide-mobile {
        display: none;
    }
}

/* 태블릿 반응형 */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .table .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

.info-text {
    color: #9a9a9a;
    font-size: 14px;
    margin-top: 20px;
    text-align: center;
}

/* 반응형 */
@media (max-width: 768px) {
    .calendar-grid {
        font-size: 14px;
        gap: 0;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 5px;
    }
    
    .header {
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .logo {
        height: 35px;
    }
    
    /* 모바일에서 메뉴 숨기고 햄버거 표시 */
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* 모바일 테이블 */
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
    
    /* 모바일에서 테이블 가로 스크롤 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 모바일 버튼 */
    .table .btn {
        padding: 3px 6px;
        font-size: 12px;
        display: inline-block;
        width: auto;
        margin: 2px;
    }
    
    /* 모바일에서 관리 열 최소 너비 */
    .table th:last-child,
    .table td:last-child {
        min-width: 100px;
    }
    
    /* 모바일 폼 개선 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* iOS 줌 방지 */
    }
    
    /* 모바일에서 컨테이너 패딩 조정 */
    .container {
        padding: 10px;
    }
    
    /* 모바일에서 박스 패딩 조정 */
    .daily-schedule,
    .calendar-container {
        padding: 15px;
    }
    
    /* 모바일에서 모달 조정 */
    .modal-content {
        margin: 10px;
        padding: 20px;
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .modal-close {
        top: 5px;
        right: 10px;
        font-size: 24px;
        background: white;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
}

/* 알림 팝업 */
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    background: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
    border: 1px solid #444;
}

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-popup-header {
    background: #d34a44;
    color: white;
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.notification-popup-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.notification-popup-close:hover {
    opacity: 1;
}

.notification-popup-body {
    padding: 15px;
}

.notification-popup-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.notification-popup-content {
    font-size: 14px;
    line-height: 1.5;
    color: #b0b0b0;
    margin-bottom: 8px;
}

.notification-popup-time {
    font-size: 12px;
    color: #666;
}

.notification-popup-actions {
    padding: 12px 15px;
    border-top: 1px solid #444;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.notification-popup-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* 알림 배지 애니메이션 강화 */
.notification-badge {
    background: #ff0000;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    position: relative;
    top: -2px;
    margin-left: 5px;
    display: inline-block;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* 모바일 알림 팝업 */
@media (max-width: 768px) {
    .notification-popup {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
    }
    
    /* 모바일 캘린더 최적화 */
    .calendar-day {
        min-height: 85px;
        height: auto;
        padding: 4px;
        font-size: 12px;
        overflow: visible;
    }
    
    .calendar-day-number {
        font-size: 14px;
        margin-bottom: 3px;
        font-weight: bold;
    }
    
    .reservation-item {
        font-size: 11px;
        padding: 2px 4px;
        margin: 1px 0;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* +n 표시 스타일 강조 */
    .reservation-item:last-child {
        background-color: #b93a32;
        font-weight: bold;
    }
    
    .calendar-day-header {
        font-size: 12px;
        padding: 5px;
    }
    
    /* 모바일에서 오늘 날짜 강조 */
    .calendar-day-today {
        background-color: #fff59d;
        border: 2px solid #f9a825;
    }
    
    .calendar-day-today .calendar-day-number {
        font-size: 15px;
    }
    
    .calendar-day-today::before {
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* Additional fixes for white background containers */
/* Ensure all text on white backgrounds is readable */
div[style*="background: white"],
div[style*="background:#fff"],
div[style*="background-color: white"],
div[style*="background-color:#fff"],
.white-bg,
.bg-white {
    color: #333 !important;
}

/* Fix form labels and help text */
div[style*="background: white"] label,
div[style*="background:#fff"] label {
    color: #333 !important;
}

div[style*="background: white"] .form-text,
div[style*="background:#fff"] .form-text,
div[style*="background: white"] small,
div[style*="background:#fff"] small {
    color: #666 !important;
}

/* Fix alert boxes on white backgrounds */
div[style*="background: white"] .alert-info,
div[style*="background:#fff"] .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}


/* 모바일 네비게이션의 알림 배지 */
.mobile-nav .notification-badge {
    float: right;
    margin-top: 2px;
}

/* 알림 페이지 스타일 */
.notifications-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.notification-item {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.notification-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notification-item.unread {
    background-color: #1a2d3d;
    border-color: #2196F3;
}

.notification-item .notification-date {
    color: #9a9a9a;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.notification-item .notification-message {
    color: #e0e0e0;
    line-height: 1.5;
    white-space: pre-line;
}

.notification-item .mark-read-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 0.85em;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.notification-item .mark-read-btn:hover {
    background-color: #1976D2;
}

.no-notifications {
    text-align: center;
    padding: 40px;
    color: #9a9a9a;
}