/* 112 Police Report System - Common Styles */

:root {
    /* Police Blue Theme */
    --police-primary: #003d82;
    --police-secondary: #0056b3;
    --police-accent: #00a8e8;
    --police-dark: #001f3f;
    --police-light: #e8f4f8;
    
    /* Status Colors */
    --status-waiting: #ffc107;
    --status-processing: #17a2b8;
    --status-completed: #28a745;
    --status-rejected: #dc3545;
    
    /* UI Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-sidebar: #001f3f;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', 'Noto Sans KR', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: var(--text-white);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    background: var(--police-dark);
    border-bottom: 2px solid var(--police-accent);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
}

.sidebar-logo svg {
    width: 40px;
    height: 40px;
    fill: var(--police-accent);
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(0, 168, 232, 0.1);
    color: var(--text-white);
    border-left-color: var(--police-accent);
}

.menu-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-secondary);
}

.top-bar {
    background: var(--bg-primary);
    padding: 20px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
}

.top-bar-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--police-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    padding: 8px 16px;
    background: var(--police-light);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--police-primary);
}

.btn-logout {
    padding: 10px 20px;
    background: var(--police-primary);
    color: var(--text-white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: var(--police-secondary);
}

.content-area {
    padding: 30px;
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-left: 4px solid var(--police-accent);
}

.stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    background: var(--police-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--police-primary);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--police-primary);
    margin-bottom: 5px;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Table */
.data-table-container {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--police-primary);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tbody tr {
    transition: background 0.2s;
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: var(--police-light);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-waiting {
    background: rgba(255, 193, 7, 0.1);
    color: #f57c00;
}

.status-processing {
    background: rgba(23, 162, 184, 0.1);
    color: #0277bd;
}

.status-completed {
    background: rgba(40, 167, 69, 0.1);
    color: #2e7d32;
}

.status-rejected {
    background: rgba(220, 53, 69, 0.1);
    color: #c62828;
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.priority-high {
    background: rgba(220, 53, 69, 0.1);
    color: #c62828;
}

.priority-medium {
    background: rgba(255, 193, 7, 0.1);
    color: #f57c00;
}

.priority-low {
    background: rgba(40, 167, 69, 0.1);
    color: #2e7d32;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary {
    background: var(--police-primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--police-secondary);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--police-light);
}

.btn-success {
    background: #28a745;
    color: var(--text-white);
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: var(--text-white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--police-accent);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: var(--bg-primary);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--police-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
