* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0000cc;
    --primary-dark: #000099;
    --success: #2d8c4e;
    --warning: #cc8800;
    --danger: #cc0000;
    --dark: #111111;
    --gray: #666666;
    --gray-light: #a0a0a0;
    --light: #f5f5f5;
    --white: #ffffff;
    --sidebar: #111111;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--sidebar);
    color: var(--white);
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.sidebar-logo i {
    font-size: 1.75rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
}

.logout-btn:hover {
    background: #990000;
    transform: translateY(-2px);
}

.admin-main {
    margin-left: 250px;
    min-height: 100vh;
}

.admin-header {
    background: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.5rem;
    color: var(--dark);
    font-weight: 700;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-weight: 500;
}

.admin-content {
    padding: 2rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.card-icon {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
}

.card-icon.total { background: var(--primary); }
.card-icon.disponivel { background: var(--success); }
.card-icon.vendido { background: var(--primary-dark); }
.card-icon.alugado { background: var(--warning); }

.card-content h3 {
    font-size: 2.25rem;
    color: var(--dark);
    font-weight: 800;
}

.card-content p {
    color: var(--gray);
    font-weight: 500;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 204, 0.3); }

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

.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #236f3e; transform: translateY(-2px); }

.btn-warning { background: var(--warning); color: var(--white); }
.btn-warning:hover { background: #996600; }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #990000; transform: translateY(-2px); }

.btn-small { padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.btn-large { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; justify-content: center; }

.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.data-table th,
.data-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--light);
}

.data-table th {
    background: var(--light);
    font-weight: 700;
    color: var(--dark);
}

.table-image {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
}

.table-no-image {
    width: 65px;
    height: 65px;
    background: var(--light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
}

.status-badge.disponivel { background: var(--success); }
.status-badge.vendido { background: var(--primary); }
.status-badge.alugado { background: var(--warning); }
.status-badge.inativo { background: var(--gray); }

.text-center {
    text-align: center;
}

.property-form {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-section {
    padding: 2rem;
    border-bottom: 1px solid var(--light);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-size: 1.35rem;
    font-weight: 700;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.85rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 204, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.existing-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--light);
}

.photo-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.photo-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.photo-badge.principal {
    background: var(--primary);
    color: var(--white);
}

.photo-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.form-actions {
    padding: 2rem;
    background: var(--light);
}

.alert {
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-box {
    background: var(--white);
    padding: 2.75rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3.25rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.login-header h2 {
    color: var(--dark);
    margin-bottom: 0.25rem;
    font-weight: 800;
}

.login-header p {
    color: var(--gray);
    font-weight: 500;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
}
