/* ===================================
   Master 페이지 전용 CSS
=================================== */

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   LOGIN SCREEN
=================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-box {
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header i {
    font-size: 48px;
    color: #FF6B35;
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 14px;
    color: #888;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.login-form label i {
    color: #FF6B35;
    margin-right: 5px;
}

.login-form input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background: #ffe5e5;
    color: #e74c3c;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.error-message i {
    margin-right: 5px;
}

/* ===================================
   BUTTONS
=================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: #fff;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    border-color: #FF6B35;
    color: #FF6B35;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

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

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

/* ===================================
   ADMIN SCREEN
=================================== */
.admin-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
}

.header-left h1 i {
    margin-right: 10px;
    color: #FF6B35;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.user-info i {
    color: #FF6B35;
    margin-right: 5px;
}

/* ===================================
   MAIN CONTENT
=================================== */
.admin-main {
    padding: 40px 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 24px;
    color: #fff;
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 13px;
    color: #888;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.search-input {
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    width: 300px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FF6B35;
}

/* Table */
.table-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.inquiry-table {
    width: 100%;
    border-collapse: collapse;
}

.inquiry-table thead {
    background: #f8f9fa;
}

.inquiry-table th {
    padding: 18px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.inquiry-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.inquiry-table tbody tr:hover {
    background: #f8f9fa;
}

.inquiry-table td {
    padding: 18px 15px;
    font-size: 14px;
    color: #333;
}

.inquiry-table td.date {
    color: #888;
    font-size: 13px;
}

.inquiry-table td.message {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loading-row td {
    text-align: center;
    padding: 60px;
    color: #888;
    font-size: 15px;
}

.loading-row i {
    margin-right: 10px;
    color: #FF6B35;
}

.empty-row td {
    text-align: center;
    padding: 60px;
    color: #aaa;
}

.empty-row i {
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.view {
    background: #e3f2fd;
    color: #2196F3;
}

.action-btn.view:hover {
    background: #2196F3;
    color: #fff;
}

.action-btn.delete {
    background: #ffebee;
    color: #e74c3c;
}

.action-btn.delete:hover {
    background: #e74c3c;
    color: #fff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination button {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    border-color: #FF6B35;
    color: #FF6B35;
}

.pagination button.active {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: #fff;
    border-color: #FF6B35;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===================================
   MODAL
=================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.modal-header h3 i {
    color: #FF6B35;
    margin-right: 8px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 30px;
}

.detail-row {
    margin-bottom: 25px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 15px;
    color: #333;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    line-height: 1.7;
}

.detail-value.message {
    white-space: pre-wrap;
    min-height: 100px;
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .inquiry-table {
        min-width: 800px;
    }
    
    .login-box {
        padding: 30px;
        margin: 20px;
    }
}
