*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Inter,Arial,sans-serif;
    background:#eef4f5;
    color:#0f172a;
}

a{
    text-decoration:none;
}

/* =========================
   MAIN APP LAYOUT
========================= */

.rp-layout{
    display:flex;
    min-height:100vh;
    background:#eef4f5;
}

.rp-sidebar{
    width:280px;
    background:#ffffff;
    border-right:1px solid #dbe4e8;
    display:flex;
    flex-direction:column;
    padding:22px;
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    z-index:100;
    overflow-y:auto;
}

.rp-sidebar-top{
    margin-bottom:12px;
}

.rp-brand{
    display:flex;
    align-items:center;
    justify-content:center;
    padding-bottom:18px;
    border-bottom:1px solid #eef2f5;
}

.rp-brand img{
    width:175px;
    max-width:100%;
    display:block;
}

.rp-nav{
    display:flex;
    flex-direction:column;
    gap:5px;
    margin-top:16px;
}

.rp-nav-link{
    display:flex;
    align-items:center;
    padding:13px 16px;
    border-radius:14px;
    color:#0f172a;
    font-size:14px;
    font-weight:500;
    transition:all .2s ease;
}

.rp-nav-link:hover{
    background:#e0f7f6;
    color:#007c91;
}

.rp-sidebar-bottom{
    margin-top:auto;
    padding-top:18px;
}

.rp-logout-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    padding:14px;
    text-align:center;
    background:linear-gradient(135deg,#00a6a6,#007c91);
    color:#fff;
    border-radius:18px;
    font-weight:600;
    transition:.2s ease;
}

.rp-logout-btn:hover{
    opacity:.92;
}

.rp-main{
    margin-left:280px;
    padding:34px;
    width:100%;
}

/* =========================
   CARDS / TYPOGRAPHY
========================= */

.rp-card{
    background:#fff;
    border-radius:28px;
    padding:28px;
    box-shadow:0 10px 30px rgba(15,23,42,.06);
    margin-bottom:24px;
}

.rp-title{
    margin:0 0 12px;
    font-size:30px;
    font-weight:600;
}

.rp-subtitle{
    margin:0;
    color:#64748b;
    font-size:16px;
    line-height:1.6;
}

.rp-hero-card{
    background:linear-gradient(135deg,#00a6a6,#007c91);
    color:#fff;
}

.rp-hero-card .rp-title,
.rp-hero-card .rp-subtitle{
    color:#fff;
}

/* =========================
   AUTH PAGES
========================= */

.rp-auth-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
    background:
        radial-gradient(circle at top left, rgba(0,166,166,.18), transparent 34%),
        linear-gradient(135deg,#eef4f5,#ffffff);
}

.rp-auth-card{
    width:100%;
    max-width:460px;
    background:#fff;
    border-radius:30px;
    padding:36px;
    box-shadow:0 18px 50px rgba(15,23,42,.10);
}

.rp-auth-logo{
    width:190px;
    display:block;
    margin:0 auto 24px;
}

.rp-auth-card h1{
    margin:0 0 8px;
    text-align:center;
    font-size:30px;
    font-weight:600;
    color:#0f172a;
}

.rp-auth-card p{
    margin:0 0 26px;
    text-align:center;
    color:#64748b;
    line-height:1.6;
}

.rp-auth-card label{
    display:block;
    margin:16px 0 7px;
    font-size:14px;
    font-weight:600;
    color:#334155;
}

.rp-auth-card input,
.rp-auth-card select{
    width:100%;
    padding:14px 16px;
    border:1px solid #dbe4e8;
    border-radius:16px;
    font-size:15px;
    outline:none;
    background:#fff;
}

.rp-auth-card input:focus,
.rp-auth-card select:focus{
    border-color:#00a6a6;
    box-shadow:0 0 0 4px rgba(0,166,166,.12);
}

.rp-auth-footer{
    margin-top:22px;
    text-align:center;
    color:#64748b;
    font-size:14px;
}

.rp-auth-footer a{
    color:#008b8b;
    font-weight:600;
}

/* =========================
   BUTTONS / ALERTS
========================= */

.rp-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    cursor:pointer;
    text-decoration:none;
    font-family:inherit;
}

.rp-btn-primary{
    width:100%;
    margin-top:22px;
    padding:15px 18px;
    border-radius:18px;
    background:linear-gradient(135deg,#00a6a6,#007c91);
    color:#fff;
    font-size:15px;
    font-weight:600;
}

.rp-alert{
    padding:13px 15px;
    border-radius:14px;
    margin-bottom:18px;
    font-size:14px;
}

.rp-alert-error{
    background:#fee2e2;
    color:#991b1b;
}

.rp-alert-success{
    background:#dcfce7;
    color:#166534;
}

/* =========================
   FORMS
========================= */

.rp-form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
}

.rp-form-grid label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:600;
    color:#334155;
}

.rp-form-grid input,
.rp-form-grid textarea,
.rp-form-grid select{
    width:100%;
    padding:14px 16px;
    border:1px solid #dbe4e8;
    border-radius:16px;
    font-size:15px;
    font-family:inherit;
    outline:none;
    background:#fff;
}

.rp-form-grid textarea{
    min-height:120px;
    resize:vertical;
}

.rp-form-grid input:focus,
.rp-form-grid textarea:focus,
.rp-form-grid select:focus{
    border-color:#00a6a6;
    box-shadow:0 0 0 4px rgba(0,166,166,.12);
}

.rp-check{
    display:flex !important;
    align-items:center;
    gap:10px;
    font-weight:500 !important;
}

.rp-check input{
    width:auto !important;
}

/* =========================
   TABLES / BADGES
========================= */

.rp-table-wrap{
    overflow:auto;
}

.rp-table{
    width:100%;
    border-collapse:collapse;
}

.rp-table th,
.rp-table td{
    padding:16px;
    text-align:left;
    border-bottom:1px solid #e2e8f0;
}

.rp-table th{
    font-size:14px;
    color:#64748b;
    font-weight:600;
}

.rp-table-link{
    color:#007c91;
    font-weight:600;
}

.rp-table-link:hover{
    text-decoration:underline;
}

.rp-badge{
    display:inline-flex;
    align-items:center;
    padding:8px 14px;
    border-radius:999px;
    background:#dcfce7;
    color:#166534;
    font-size:13px;
    font-weight:600;
}

.rp-badge-pinned{
    background:#dbeafe;
    color:#1d4ed8;
}

/* =========================
   DASHBOARD STATS / ACTIONS
========================= */

.rp-stat-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:24px;
}

.rp-stat-card{
    background:#fff;
    border-radius:24px;
    padding:24px;
    box-shadow:0 10px 30px rgba(15,23,42,.06);
}

.rp-stat-card span{
    display:block;
    color:#64748b;
    font-size:14px;
    margin-bottom:10px;
}

.rp-stat-card strong{
    font-size:34px;
    font-weight:600;
    color:#0f172a;
}

.rp-action-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
}

.rp-action-card{
    background:#eefafa;
    color:#007c91;
    border:1px solid #c7eeee;
    padding:22px;
    border-radius:20px;
    font-weight:600;
    text-align:center;
}

.rp-action-card:hover{
    background:#dff7f7;
}

/* =========================
   NOTICES
========================= */

.rp-notice-card{
    border-left:6px solid #00a6a6;
}

.rp-notice-top{
    display:flex;
    justify-content:space-between;
    gap:20px;
    margin-bottom:18px;
}

.rp-notice-badges{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.rp-notice-date{
    color:#64748b;
    font-size:14px;
    white-space:nowrap;
}

.rp-notice-message{
    color:#334155;
    line-height:1.8;
    font-size:15px;
}

.rp-notice-actions{
    margin-top:22px;
}

.rp-acknowledged{
    display:inline-flex;
    align-items:center;
    padding:12px 18px;
    border-radius:999px;
    background:#dcfce7;
    color:#166534;
    font-size:14px;
    font-weight:600;
}

/* =========================
   TICKETS / STATUSES
========================= */

.rp-status-open{
    background:#fee2e2;
    color:#991b1b;
}

.rp-status-in_progress{
    background:#fef3c7;
    color:#92400e;
}

.rp-status-awaiting_resident{
    background:#dbeafe;
    color:#1d4ed8;
}

.rp-status-resolved{
    background:#dcfce7;
    color:#166534;
}

.rp-status-closed{
    background:#e5e7eb;
    color:#374151;
}

.rp-priority-low{
    background:#e0f2fe;
    color:#075985;
}

.rp-priority-medium{
    background:#fef3c7;
    color:#92400e;
}

.rp-priority-high{
    background:#fed7aa;
    color:#9a3412;
}

.rp-priority-urgent{
    background:#fee2e2;
    color:#991b1b;
}

.rp-ticket-meta{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:22px;
}

.rp-ticket-message{
    color:#334155;
    line-height:1.8;
    font-size:15px;
}

.rp-reply-top{
    display:flex;
    justify-content:space-between;
    gap:20px;
    margin-bottom:14px;
    color:#64748b;
    font-size:14px;
}

.rp-ticket-textarea{
    width:100%;
    min-height:160px;
    padding:16px;
    border:1px solid #dbe4e8;
    border-radius:18px;
    font-size:15px;
    font-family:inherit;
    resize:vertical;
    outline:none;
}

.rp-ticket-textarea:focus{
    border-color:#00a6a6;
    box-shadow:0 0 0 4px rgba(0,166,166,.12);
}

.rp-status-form{
    display:flex;
    gap:16px;
    align-items:center;
    flex-wrap:wrap;
}

.rp-status-form select{
    min-width:240px;
}

.rp-internal-note{
    border-left:6px solid #f59e0b;
    background:#fffbeb;
}

.rp-internal-label{
    display:inline-block;
    margin-bottom:16px;
    padding:6px 12px;
    border-radius:999px;
    background:#fef3c7;
    color:#92400e;
    font-size:13px;
    font-weight:600;
}

.rp-resident-reply{
    border-left:6px solid #00a6a6;
}

.rp-admin-reply{
    border-left:6px solid #2563eb;
}

.rp-back-link{
    display:inline-flex;
    margin-top:10px;
    color:#007c91;
    font-weight:600;
}

/* =========================
   PUBLIC BUILDING PAGE
========================= */

.rp-public-body{
    background:#eef4f5;
}

.rp-public-wrap{
    max-width:1100px;
    margin:0 auto;
    padding:40px 20px;
}

.rp-public-header{
    text-align:center;
    margin-bottom:30px;
}

.rp-public-logo{
    width:220px;
    max-width:100%;
    margin-bottom:24px;
}

.rp-public-header h1{
    margin:0 0 10px;
    font-size:42px;
    font-weight:600;
    color:#0f172a;
}

.rp-public-header p{
    margin:0;
    color:#64748b;
    font-size:18px;
}

.rp-public-notice{
    padding:24px 0;
    border-bottom:1px solid #e2e8f0;
}

.rp-public-notice:last-child{
    border-bottom:0;
}

.rp-public-notice h3{
    margin:16px 0 12px;
    font-size:22px;
    font-weight:600;
}

.rp-public-notice p{
    margin:0 0 14px;
    line-height:1.8;
    color:#334155;
}

.rp-public-notice small{
    color:#64748b;
}

.rp-public-docs{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:18px;
}

.rp-public-doc{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:20px;
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:10px;
    color:#0f172a;
}

.rp-public-doc strong{
    font-size:16px;
    font-weight:600;
}

.rp-public-doc span{
    color:#64748b;
    font-size:14px;
}

/* =========================
   FOOTER
========================= */

.rp-copyright{
    margin-top:12px;
    color:#94a3b8;
    font-size:14px;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:1000px){

    .rp-stat-grid,
    .rp-action-grid{
        grid-template-columns:repeat(2,1fr);
    }

}

@media(max-width:760px){

    .rp-sidebar{
        position:relative;
        width:100%;
        height:auto;
        bottom:auto;
    }

    .rp-layout{
        display:block;
    }

    .rp-main{
        margin-left:0;
        padding:22px;
    }

    .rp-form-grid{
        grid-template-columns:1fr;
    }

    .rp-stat-grid,
    .rp-action-grid{
        grid-template-columns:1fr;
    }

    .rp-notice-top{
        flex-direction:column;
    }

}