:root {
    --bg-gradient-start: #0f0c29;
    --bg-gradient-mid: #302b63;
    --bg-gradient-end: #24243e;
    --primary: #ff007a;
    --secondary: #00d2ff;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s ease;
    --danger: #ff4d4d;
    --success: #2ecc71;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-mid), var(--bg-gradient-end));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.globe-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(255, 0, 122, 0.5);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    opacity: 0.7;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    opacity: 1;
    color: var(--secondary);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

section {
    display: none;
    width: 100%;
    max-width: 600px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

section.active {
    display: flex;
    /* Or block depending on layout */
    flex-direction: column;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 3rem;
    background: linear-gradient(to right, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
}

.primary-btn,
.secondary-btn,
.danger-btn {
    padding: 14px 28px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 10px;
    text-decoration: none;
}

.primary-btn {
    background: linear-gradient(45deg, var(--primary), #ff5e62);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 122, 0.4);
}

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

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.danger-btn {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.6);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ccc;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.2);
}

/* Specific elements */
.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px dashed var(--glass-border);
    padding: 30px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: #aaa;
}

.upload-label:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(0, 210, 255, 0.05);
}

.upload-label i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.blink {
    animation: blinker 1s linear infinite;
    color: var(--danger);
    font-weight: bold;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.success-icon {
    color: var(--success);
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.danger-icon {
    color: var(--danger);
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.case-id-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-id-box strong {
    color: var(--secondary);
}

.hidden {
    display: none !important;
}

/* --- Admin Portal Styles --- */

.admin-body {
    background: linear-gradient(135deg, #090909, #1a1a2e, #16213e);
}

.globe-admin-1 {
    background: #00d2ff;
    top: -50px;
    left: -50px;
    width: 600px;
    height: 600px;
    opacity: 0.2;
}

.globe-admin-2 {
    background: #ff007a;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    opacity: 0.15;
}

.login-panel {
    max-width: 400px;
    margin: 100px auto;
}

.full-width {
    width: 100%;
    justify-content: center;
    margin: 20px 0 0;
}

.hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 15px;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    height: 100%;
    border-radius: 0;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar .logo.small {
    font-size: 1.2rem;
    margin-bottom: 40px;
    justify-content: flex-start;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin: 0;
    font-weight: 500;
    color: #aeaeae;
    transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-nav i {
    width: 20px;
}

.logout-container {
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.dashboard-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
}

.dashboard-header {
    margin-bottom: 30px;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    flex: 1;
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card h3 {
    font-size: 1rem;
    color: #888;
    margin: 0;
}

.stat-card span {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.stat-card.emergency span {
    color: var(--danger);
}

/* Table Styles */
.reports-table-container {
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
}

th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: #aaa;
    font-size: 0.9rem;
    text-transform: uppercase;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    background: #333;
    color: #ccc;
}

.status-emergency {
    background: rgba(255, 77, 77, 0.2);
    color: #ff4d4d;
}

.status-pending {
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
}

.status-resolved {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.view-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    max-width: 600px;
    max-height: 90vh;
    padding: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

.detail-row {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-section {
    margin-bottom: 20px;
    text-align: left;
}

.detail-section label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.desc-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    text-align: right;
    background: rgba(0, 0, 0, 0.1);
}