/**
 * Fisheries Disaster Management System - Stylesheet
 * Modern, Professional Design
 */

/* ============================================
   CSS Variables & Root Styles
   ============================================ */
:root {
    --primary-color: #1a5f7a;
    --primary-dark: #134b5f;
    --primary-light: #2980b9;
    --secondary-color: #27ae60;
    --secondary-dark: #1e8449;
    --accent-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #dfe6e9;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   Login Page Styles
   ============================================ */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 20px;
}

.login-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
}

.login-header .logo i {
    font-size: 36px;
    color: var(--white);
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.login-form label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.15);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.login-footer .hint {
    margin-top: 10px;
}

.login-footer code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* ============================================
   Button Styles
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-logout {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: var(--accent-color);
    color: var(--white);
}

/* ============================================
   Alert Styles
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 1.2rem;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* ============================================
   Header Styles
   ============================================ */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left .logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-left .logo i {
    font-size: 22px;
    color: var(--white);
}

.header-left h1 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.district-badge {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.username {
    color: var(--text-light);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding: 30px;
    min-height: calc(100vh - 140px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header p {
    color: var(--text-light);
    margin-top: 5px;
    margin-left: 38px;
}

/* ============================================
   Form Styles
   ============================================ */
.damage-form {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-section {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}

.form-row.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.required {
    color: var(--accent-color);
}

.optional-text {
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* ============================================
   File Upload Styles
   ============================================ */
.file-upload-group {
    position: relative;
}

.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-color);
}

.file-upload-wrapper:hover {
    border-color: var(--primary-color);
    background: rgba(26, 95, 122, 0.05);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    pointer-events: none;
}

.file-upload-label i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.file-upload-label span {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.file-upload-label small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.file-name {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.file-upload-wrapper.has-file {
    border-color: var(--secondary-color);
    background: rgba(39, 174, 96, 0.05);
}

/* ============================================
   Form Actions
   ============================================ */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 25px 30px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Footer Styles
   ============================================ */
.main-footer {
    background: var(--white);
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .form-row.three-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .header-left h1 {
        font-size: 1.1rem;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .form-row,
    .form-row.three-columns {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 15px;
    }

    .form-section {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .page-header h2 {
        font-size: 1.4rem;
    }

    .page-header p {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 25px;
    }

    .login-header h1 {
        font-size: 1.2rem;
    }

    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   Animation Classes
   ============================================ */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-down {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Navigation Tabs
   ============================================ */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-tab {
    padding: 10px 20px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover,
.nav-tab.active {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-20 {
    margin-top: 20px;
}
