/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TOP HEADER ===== */
.top-header {
    background: #fff;
    border-bottom: 2px solid #eee;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left .logo img {
    height: 55px;
    object-fit: contain;
}

.header-left .owner-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    mix-blend-mode: screen;
    border: 2px solid #ddd;
}

.header-left .logo h1 {
    font-size: 2.2rem;
    color: #d32f2f;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    cursor: pointer;
    background: #f8f8f8;
    padding: 8px 14px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.date-selector #display-date {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.date-selector .date-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 1rem;
}

.admin-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    color: #555;
    transition: all 0.3s;
}

.admin-link:hover {
    background: #333;
    color: #fff;
}

.owner-circle {
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #1a237e;
    flex-shrink: 0;
}

.owner-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.main-content .container {
    width: 100%;
}

/* ===== REGIONS GRID ===== */
.regions-grid {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 30px;
    justify-content: center;
}

.region-card {
    text-align: center;
}

.region-paper {
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.region-paper:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

.region-paper a {
    display: block;
    width: 100%;
    height: 100%;
}

.region-paper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-paper-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: #f9f9f9;
    color: #bbb;
    padding: 20px;
}

.no-paper-placeholder i {
    font-size: 4rem;
    margin-bottom: 15px;
}

.no-paper-placeholder p {
    font-size: 0.95rem;
    color: #999;
}

/* ===== REGION NAME ===== */
.region-name {
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 1.5px;
}

/* ===== DISTRICTS LINK ===== */
.districts-link {
    margin-top: 8px;
    position: relative;
    display: inline-block;
}

.districts-link > a {
    color: #1565c0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

.districts-link > a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* ===== DISTRICTS DROPDOWN ===== */
.districts-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 180px;
    z-index: 100;
    margin-top: 5px;
}

.districts-dropdown.show {
    display: block;
}

.districts-dropdown a {
    display: block;
    padding: 8px 20px;
    font-size: 0.85rem;
    color: #333;
    transition: background 0.2s;
}

.districts-dropdown a:hover {
    background: #e3f2fd;
    color: #1565c0;
}

/* ===== FOOTER ===== */
.main-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 15px 0;
    text-align: center;
}

.main-footer p {
    font-size: 0.8rem;
    color: #888;
}

.main-footer a {
    color: #1565c0;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .regions-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
        justify-items: center;
    }

    .region-card {
        max-width: none !important;
    }
    
    .region-paper {
        width: 90px !important;
        height: 90px !important;
        border-radius: 50% !important;
        border: 3px solid #1a237e !important;
        overflow: hidden !important;
        margin: 0 auto;
    }
    
    .region-paper a {
        display: block;
        width: 100%;
        height: 100%;
    }

    .region-paper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .no-paper-placeholder {
        border-radius: 50%;
    }
    .no-paper-placeholder i {
        font-size: 1.5rem;
    }
    .no-paper-placeholder p {
        font-size: 0.6rem;
    }

    .region-name {
        font-size: 0.7rem;
        margin-top: 8px;
        letter-spacing: 0.5px;
    }

    .districts-link a {
        font-size: 0.75rem;
    }
}


@media (max-width: 900px) and (min-width: 769px) {
    .regions-grid {
        grid-template-columns: repeat(3, auto);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header-left .logo img {
        height: 35px;
    }
    .top-header .container {
        flex-wrap: wrap;
        gap: 8px;
    }
    .main-content {
        padding: 20px 0;
    }
}
