/**
 * CRM Glass Main Styles
 */

/* Calendar Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 1rem;
}

.calendar-day {
    min-height: 100px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.calendar-day--header {
    min-height: auto;
    background: transparent;
    border: none;
    font-weight: 600;
    text-align: center;
    padding-bottom: 8px;
    color: var(--text-secondary);
}

.calendar-day--outside {
    opacity: 0.3;
    pointer-events: none;
}

/* 요일 색상 - 더 눈에 띄게 */
.calendar-day--sunday .day-number,
.calendar-day--header.calendar-day--sunday {
    color: #dc2626 !important;
    font-weight: 700 !important;
}

.calendar-day--saturday .day-number,
.calendar-day--header.calendar-day--saturday {
    color: #2563eb !important;
    font-weight: 600 !important;
}

.calendar-day--holiday {
    background: rgba(220, 38, 38, 0.15) !important;
    border-color: rgba(220, 38, 38, 0.4) !important;
}

.calendar-day--holiday .day-number {
    color: #dc2626 !important;
    font-weight: 700 !important;
}

.calendar-day--sunday {
    background: rgba(220, 38, 38, 0.08);
}

.calendar-day--saturday {
    background: rgba(37, 99, 235, 0.08);
}

.calendar-day--today {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.day-number {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.event-holiday {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-weight: 500;
}

.event-official {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-left: 2px solid #3b82f6;
}

.event-personal {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-left: 2px solid #10b981;
}

.event-meeting {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-left: 2px solid #f59e0b;
}

/* Toast 메시지 */
.crm-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.crm-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.crm-toast--success {
    border-left: 3px solid var(--accent-success);
}

.crm-toast--error {
    border-left: 3px solid var(--accent-danger);
}

.crm-toast--warning {
    border-left: 3px solid var(--accent-warning);
}

/* ===========================================
   Admin Sections (N계정, 기자단 배포, 모바일팜)
   =========================================== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header .section-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Device Grid */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.device-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.device-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.device-icon {
    font-size: 1.5rem;
}

.device-slot {
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.device-status {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.device-status.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.device-status.status-inactive {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.device-status.status-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.device-status.status-charging {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.device-card__body h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.device-card__body p {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
}

.device-ip {
    font-family: monospace;
    font-size: 0.8rem !important;
    color: var(--accent-primary) !important;
}

.device-card__footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Badge Types */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge--blog {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.badge--cafe {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge--place {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge--shopping {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

/* Status Badges */
.status-badge--pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-badge--processing {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.status-badge--completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge--cancelled {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.status-badge--active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge--inactive {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.status-badge--banned {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge--checking {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* Small Button */
.btn--sm {
    padding: 4px 8px;
    font-size: 0.75rem;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}