:root {
    --primary: #2b5c3f;
    --primary-light: #3c8258;
    --secondary: #f4ecd8;
    --dark: #1a1a1a;
    --text: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --danger: #e74c3c;
    --success: #2ecc71;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text);
    line-height: 1.6;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-danger-sm {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 92, 63, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

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

.btn-danger-sm {
    background-color: #ffeaea;
    color: var(--danger);
    padding: 6px 12px;
    font-size: 0.85rem;
}

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

.mt-4 { margin-top: 1rem; }

/* ------------------ Map Page ------------------ */
.map-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.map-header {
    padding: 20px 40px;
    z-index: 1000;
    position: relative;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin-bottom: -20px;
}

.map-header h1 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.map-header p {
    color: var(--text-light);
}

.map-container {
    flex: 1;
    position: relative;
    display: flex;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.side-panel {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 380px;
    max-height: calc(100vh - 120px);
    border-radius: 16px;
    padding: 24px;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.panel-inner h3 {
    color: var(--dark);
    margin-bottom: 8px;
}

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

.hidden { display: none !important; }

.shop-details {
    margin-top: 20px;
    animation: fadeIn 0.4s ease-in-out;
}

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

.shop-details h4 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.address-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.5);
    padding: 12px;
    border-radius: 8px;
}

.address-box svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

#shop-direction {
    width: 100%;
    display: block;
}

/* ------------------ Login Page ------------------ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f4ecd8 0%, #e0d5ba 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;
}

.login-container h2 {
    color: var(--dark);
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.2;
}

.login-container h2 span {
    color: var(--primary);
    font-size: 0.9em;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 92, 63, 0.1);
}

.login-container button {
    width: 100%;
    margin-top: 10px;
}

.error-msg {
    background: #ffeaea;
    color: var(--danger);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

/* ------------------ Admin Page ------------------ */
.admin-page {
    background: #f4f6f8;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 16px 16px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 15px;
}

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

.main-panel {
    padding: 30px;
    border-radius: 16px;
}

.panel-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.panel-header h2 {
    color: var(--dark);
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.success-alert {
    background: #eafbf0;
    color: var(--success);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--success);
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background-color: rgba(43, 92, 63, 0.02);
}

.coords {
    font-family: monospace;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 40px !important;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .map-header { padding: 15px 20px; }
    .side-panel {
        position: fixed;
        bottom: 0;
        top: auto;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 50vh;
        border-radius: 20px 20px 0 0;
    }
    .admin-nav { flex-direction: column; gap: 15px; }
}

/* Admin Form & Map Layout */
.form-map-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.input-group-with-btn {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.input-group-with-btn .input-field {
    flex: 1;
}

.input-group-with-btn button {
    height: 46px;
    padding: 0 15px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-map-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.admin-map-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

#admin-map {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 1;
}

/* Global Geocoding Tool */
.global-geocode-panel {
    border-top: 4px solid var(--primary);
}

.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
    height: 20px;
    display: none;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary);
    transition: width 0.3s ease;
    text-align: center;
    line-height: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.geocode-log {
    background-color: #1e1e1e;
    color: #f1f1f1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    padding: 15px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
    display: none;
    border: 1px solid #333;
}

.geocode-log div {
    margin-bottom: 4px;
    line-height: 1.4;
}

.geocode-log .log-success {
    color: #2ecc71;
}

.geocode-log .log-warning {
    color: #f1c40f;
}

.geocode-log .log-error {
    color: #e74c3c;
}

.geocode-log .log-info {
    color: #3498db;
}

/* Responsive adjustment for admin map layout */
@media (max-width: 992px) {
    .form-map-layout {
        grid-template-columns: 1fr;
    }
    #admin-map {
        height: 250px;
    }
}

/* Category Filters & List View */
.filter-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 15px;
    gap: 4px;
}

.filter-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.filter-tab:hover {
    color: var(--primary);
}

.filter-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.list-count {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 600;
}

.shop-list-container {
    flex: 1;
    overflow-y: auto;
    margin-right: -10px;
    padding-right: 10px;
}

.shop-list-container::-webkit-scrollbar {
    width: 6px;
}

.shop-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.shop-list-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.shop-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.shop-item {
    background: var(--white);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.shop-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(43, 92, 63, 0.15);
}

.shop-item h5 {
    color: var(--dark);
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 4px;
}

.shop-item-address {
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.4;
}

.shop-item-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.btn-back {
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: var(--primary-light);
}

.btn-back .arrow {
    font-size: 1.1rem;
}

.empty-list {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
}

/* Badges for Admin Table & UI */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
}

.badge-primary, .shop-item-badge.badge-primary {
    background-color: rgba(43, 92, 63, 0.1);
    color: var(--primary);
}

.badge-gold, .shop-item-badge.badge-gold {
    background-color: rgba(212, 175, 55, 0.15);
    color: #b8860b;
}

/* Sirene Search Results Dropdown */
.sirene-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.sirene-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.sirene-result-item:hover {
    background-color: rgba(43, 92, 63, 0.05);
}

.sirene-result-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.sirene-result-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.sirene-result-address {
    font-size: 0.8rem;
    color: var(--text);
}

/* Custom Delete Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
}

.modal-content {
    width: 100%;
    max-width: 450px;
    border-radius: 16px;
    padding: 24px;
    background: var(--white);
    animation: modalScaleUp 0.3s ease-out;
}

@keyframes modalScaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header h3 {
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.modal-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer button {
    padding: 8px 18px;
    font-size: 0.9rem;
}

