/* Lanier Mineral Archive - Stylesheet */

:root {
    --primary-color: #2c5f2d;
    --secondary-color: #97b56f;
    --accent-color: #c49c48;
    --danger-color: #c44;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.15);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.main-nav a:hover {
    opacity: 0.8;
}

.user-menu {
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.user-menu-dropdown {
    position: relative;
}

.user-menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-menu-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.user-menu-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.user-menu-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown-content.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 2.5rem;
}

.page-header p {
    margin: 0;
    color: var(--text-light);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
}

.stat-card-link:hover .stat-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Land Info Grid */
.land-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.property-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.property-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
}

.property-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.property-card h3 a:hover {
    text-decoration: underline;
}

.property-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

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

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.data-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Search Forms */
.search-form {
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-form-large {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input-large {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
}

.search-input-large:focus {
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background-color: var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    background-color: #ccc;
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #234d23;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #7a9956;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #a33;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-blue {
    background-color: #4a90e2;
}

.badge-green {
    background-color: #5cb85c;
}

.badge-orange {
    background-color: #f0ad4e;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: var(--danger-color);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
}

.help-text {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-light);
}

/* Footer */
.main-footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

.main-footer p {
    margin: 0.5rem 0;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 2.5rem;
}

.login-box h1 {
    margin: 0 0 0.5rem 0;
    text-align: center;
    color: var(--primary-color);
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        flex-direction: column;
        gap: 0;
        width: 100%;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .main-nav.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav a {
        padding: 1rem;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        display: block;
        width: 100%;
    }
    
    .main-nav a:last-child {
        border-bottom: none;
    }
    
    .main-nav a:hover {
        background: rgba(255,255,255,0.1);
        opacity: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form-large {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 0.85rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
        min-width: 100px;
    }
    
    /* Card layouts */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Form layouts */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        width: 100%;
        padding: 0.75rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Button layouts */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px; /* Touch-friendly */
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Navigation improvements */
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .user-menu span {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 1rem 0.5rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.4rem 0.2rem;
        min-width: 80px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stack form elements */
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    /* Make buttons full width on mobile */
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Hide less important elements on very small screens */
    .text-muted {
        font-size: 0.8rem;
    }
    
    /* Improve touch targets */
    a, button, input, select, textarea {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .data-table {
        font-size: 1rem;
    }
}

/* PWA Install Button */
#pwa-install-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    background: linear-gradient(135deg, #2c5f2d, #97b56f);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out;
}

#pwa-install-btn:hover {
    background: linear-gradient(135deg, #1e3f1f, #7a9a5a);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 95, 45, 0.4);
}

#pwa-install-btn:active {
    transform: translateY(0);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* PWA Status Bar */
.pwa-status {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c5f2d;
    color: white;
    padding: 8px 16px;
    text-align: center;
    font-size: 12px;
    z-index: 1000;
    display: none;
}

.pwa-status.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Hide install button on mobile when not needed */
@media (max-width: 768px) {
    #pwa-install-btn {
        top: 5px;
        right: 5px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Print styles */
@media print {
    .main-header,
    .btn,
    .history-actions,
    #pwa-install-btn,
    .pwa-status {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    .data-table {
        font-size: 12pt;
    }
}

