/* public/css/style.css - CSS Gabungan Login & Dashboard */

/* 1. Reset Global & Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f3f4f6;
    min-height: 100vh;
}

/* 2. STYLE KHUSUS HALAMAN LOGIN */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid #e5e7eb;
}

.header-section {
    text-align: center;
    margin-bottom: 2rem;
}

.header-section .logo {
    font-size: 2.5rem;
}

.header-section h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-top: 0.5rem;
    font-weight: 700;
}

.header-section p {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.alert-error {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.form-group input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.15s ease-in-out;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-submit {
    width: 100%;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.15s ease-in-out;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background-color: #1d4ed8;
}

/* 3. STYLE KHUSUS HALAMAN DASHBOARD */
.dashboard-body {
    display: flex;
}

aside {
    width: 16rem;
    background-color: #1e293b;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #334155;
}

.sidebar-nav {
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link.active {
    background-color: #2563eb;
    color: #ffffff;
}

.nav-link:hover:not(.active) {
    background-color: #334155;
    color: #ffffff;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #334155;
}

.btn-logout {
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    color: #f87171;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: #334155;
    color: #ffffff;
}

main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.5rem;
    color: #1f2937;
    font-weight: 700;
}

header .date-info {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    text-transform: uppercase;
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 0.25rem;
}

.icon-wrapper {
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.bg-green { background-color: #f0fdf4; color: #16a34a; }
.bg-blue { background-color: #eff6ff; color: #2563eb; }
.bg-red { background-color: #fef2f2; color: #dc2626; }
.bg-purple { background-color: #faf5ff; color: #9333ea; }

.table-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.table-header a {
    font-size: 0.875rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.table-header a:hover {
    text-decoration: underline;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

thead tr {
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

th, td {
    padding: 1rem;
}

tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
    color: #4b5563;
    font-size: 0.875rem;
}

tbody tr:hover {
    background-color: #f9fafb;
}

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-dark { color: #1f2937; }

.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-lunas { background-color: #dcfce7; color: #15803d; }
.badge-pending { background-color: #fef9c3; color: #a16207; }
.text-center-muted { padding: 2rem; text-align: center; color: #9ca3af; }

/* 4. STYLE KHUSUS PENYEWA */
.tenant-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .tenant-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.upload-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.alert-success {
    background-color: #dcfce7;
    border-left: 4px solid #16a34a;
    color: #14532d;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.875rem;
}

.btn-logout{
    width:100%;
    background:#dc2626;
    color:#fff;
    padding:12px;
    border-radius:8px;
    text-align:center;
    border:none;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
}

.btn-logout:hover{
    background:#b91c1c;
}