* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.calendar-container {
    /*max-width: 1200px;*/
    margin: 0 auto;
    /*padding: 1rem;*/
}

/* 헤더 */
.calendar-menu-header {
    display: flex;
    position: static;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    background: none;
}

.title {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title i {
    color: #3b82f6;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* 버튼 */
.content .btn {
    padding: 0.5rem 1rem !important;
    border: none !important;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #3b82f6 !important;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-black {
    background-color: #162235 !important;
    color: white;
}

.btn-black:hover:not(:disabled) {
    background-color: #101825;
}

.btn-outline {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db !important;
}

.btn-outline:hover:not(:disabled) {
    background-color: #f9fafb;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-icon {
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
}

/* 메인 컨텐츠 */
.main-content {
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.calendar-section {
    flex: 1;
    transition: all 0.3s ease;
}

.events-section {
    width: 24rem;
    transition: all 0.3s ease;
}

.events-section.hidden {
    display: none;
}

/* 카드 */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.card-content {
    padding: 1.5rem;
}

/* 캘린더 iframe */
.calendar-iframe {
    width: 100%;
    height: 600px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.calendar-iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 일정 목록 */
.events-list {
    max-height: 600px;
    overflow-y: auto;
    display: none;
}

.events-list.active {
    display: block;
}

.event-item {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s;
}

.event-item:last-child {
    margin-bottom: 0;
}

.event-item:hover {
    background-color: #f9fafb;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.event-location,
.event-description,
.event-attendees {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.event-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.event-actions .btn {
    padding: 0.25rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 42rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.2s ease;
}

.modal-small {
    max-width: 28rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
}

.modal-close:hover {
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

/* 폼 */
.form-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input[type="date"] {
    padding-right: 0.5rem;
}

.form-group small {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* 스위치 */
.switch-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.switch {
    position: relative;
    width: 2.5rem;
    height: 1.25rem;
    background-color: #d1d5db;
    border-radius: 0.625rem;
    transition: background-color 0.2s;
}

.switch::before {
    content: "";
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1rem;
    height: 1rem;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

input[type="checkbox"]:checked + .switch {
    background-color: #3b82f6;
}

input[type="checkbox"]:checked + .switch::before {
    transform: translateX(1.25rem);
}

input[type="checkbox"] {
    display: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* 삭제 정보 */
.delete-info {
    background-color: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.delete-info h3 {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.delete-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* 토스트 */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
}

.toast {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
    max-width: 20rem;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: #6b7280;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(1rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .events-section {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .calendar-menu-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-buttons {
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}
