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

:root {
    --primary: #9333ea;
    --primary-dark: #7e22ce;
    --primary-light: #f3e8ff;
    --secondary: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f3e8ff 0%, #ffffff 50%, #f3e8ff 100%);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: white;
    border-bottom: 2px solid var(--primary-light);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

nav a {
    color: var(--gray-600);
    text-decoration: none;
    margin-left: 30px;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

/* Main */
main {
    padding: 40px 0;
}

/* Cards */
.card {
    background: white;
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    color: var(--gray-900);
}

.card-header span {
    font-size: 28px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.required {
    color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

input[type="text"].error,
input[type="email"].error,
input[type="password"].error,
textarea.error {
    border-color: var(--danger);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio e Checkbox */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Buttons */
button,
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

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

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-100);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid var(--danger);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid var(--warning);
}

.alert-info {
    background: var(--primary-light);
    color: #5b21b6;
    border: 2px solid var(--primary);
}

/* Grid */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background: var(--primary-light);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
}

tr:hover {
    background: var(--gray-50);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--primary-light);
    margin-bottom: 20px;
}

.tab {
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-600);
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    button,
    .btn {
        width: 100%;
    }
    
    nav a {
        margin-left: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

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

.gap-10 {
    gap: 10px;
}

.error-text {
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
}

.success-text {
    color: var(--success);
    font-size: 12px;
    margin-top: 5px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

