/* Admin Specific Styles */

/* Modal Base */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.modal-small {
    max-width: 400px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 900;
    color: #1a365d;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #1a365d;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Login Modal */
#loginModal .modal-content {
    text-align: center;
}

#loginModal h2 {
    font-size: 28px;
    font-weight: 900;
    color: #1a365d;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-hint {
    margin-top: 20px;
    font-size: 14px;
    color: #718096;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

/* Admin Header */
.admin-header {
    background: linear-gradient(135deg, #1a365d, #2c5282);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo h1 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 5px;
}

.admin-logo p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.admin-actions {
    display: flex;
    gap: 10px;
}

/* Admin Main */
.admin-main {
    min-height: calc(100vh - 100px);
    padding: 40px 0;
    background: #f7fafc;
}

.admin-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e2e8f0;
}

.admin-header-section h2 {
    font-size: 28px;
    font-weight: 900;
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Admin Notice List */
.admin-notice-list {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.admin-notice-item {
    padding: 25px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.admin-notice-item:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-notice-item.important {
    border-color: #d4af37;
    background: #fffbf0;
}

.notice-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.notice-item-info {
    flex: 1;
}

.notice-item-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
    margin: 5px 0;
}

.notice-item-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #2c5282;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #f7fafc;
    color: #1a365d;
}

.btn-icon.btn-danger {
    color: #e53e3e;
}

.btn-icon.btn-danger:hover {
    background: #fff5f5;
    color: #c53030;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
}

.badge-important {
    background: #d4af37;
    color: white;
}

.badge-draft {
    background: #718096;
    color: white;
}

.notice-item-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #718096;
    margin-bottom: 15px;
}

.notice-item-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.notice-item-meta i {
    color: #d4af37;
}

.notice-item-preview {
    color: #2d3748;
    line-height: 1.6;
}

/* Empty & Loading States */
.loading-spinner,
.empty-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading-spinner i,
.empty-state i,
.error-state i {
    font-size: 48px;
    color: #d4af37;
    margin-bottom: 20px;
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-hint {
    font-size: 14px;
    color: #a0aec0;
    margin-top: 10px;
}

/* Notice Editor Form */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#noticeContent {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
}

/* Delete Modal */
.delete-message {
    text-align: center;
    padding: 20px 0;
    color: #2d3748;
    line-height: 1.8;
}

/* Button Styles */
.btn-danger {
    background: #e53e3e;
    color: white;
}

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

/* Responsive */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        gap: 15px;
    }

    .admin-actions {
        width: 100%;
        justify-content: stretch;
    }

    .admin-actions .btn {
        flex: 1;
    }

    .admin-header-section {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .admin-header-section h2 {
        font-size: 24px;
    }

    #createNoticeBtn {
        width: 100%;
    }

    .notice-item-header {
        flex-direction: column;
        gap: 15px;
    }

    .notice-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}