/* ZIBAWU Portal - Custom Styles */

/* Alpine.js x-cloak - hide elements until Alpine is ready */
[x-cloak] {
    display: none !important;
}

/* Custom color scheme */
:root {
    --zibawu-primary: #1f2937;
    --zibawu-secondary: #4b5563;
    --zibawu-accent: #3b82f6;
    --zibawu-success: #10b981;
    --zibawu-warning: #f59e0b;
    --zibawu-error: #ef4444;
}

/* Global styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--zibawu-accent);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form enhancements */
.form-input {
    @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

.btn-primary {
    @apply bg-gray-800 text-white px-6 py-2 rounded-lg font-medium hover:bg-gray-700 transition duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500;
}

.btn-secondary {
    @apply bg-white text-gray-700 px-6 py-2 rounded-lg font-medium border border-gray-300 hover:bg-gray-50 transition duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500;
}

/* Card styles */
.card {
    @apply bg-white rounded-2xl shadow-sm p-6;
}

.card-header {
    @apply text-xl font-semibold mb-4 text-gray-900;
}

/* Alert styles */
.alert {
    @apply rounded-lg p-4 mb-4;
}

.alert-success {
    @apply bg-green-50 text-green-800 border border-green-200;
}

.alert-error {
    @apply bg-red-50 text-red-800 border border-red-200;
}

.alert-warning {
    @apply bg-yellow-50 text-yellow-800 border border-yellow-200;
}

.alert-info {
    @apply bg-blue-50 text-blue-800 border border-blue-200;
}

/* Table styles */
.table {
    @apply w-full border-collapse;
}

.table th {
    @apply bg-gray-100 text-left px-4 py-3 text-sm font-semibold text-gray-700 border-b-2 border-gray-200;
}

.table td {
    @apply px-4 py-3 text-sm text-gray-900 border-b border-gray-200;
}

.table tbody tr:hover {
    @apply bg-gray-50;
}

/* Badge styles */
.badge {
    @apply inline-block px-3 py-1 text-xs font-semibold rounded-full;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-error {
    @apply bg-red-100 text-red-800;
}

.badge-info {
    @apply bg-blue-100 text-blue-800;
}

/* Tabs */
.tab-button {
    @apply px-4 py-2 rounded-xl font-medium transition duration-200;
}

.tab-button-active {
    @apply bg-gray-800 text-white;
}

.tab-button-inactive {
    @apply bg-white text-gray-700 border border-gray-300 hover:bg-gray-50;
}

/* Password strength indicator */
.password-strength {
    @apply mt-2 h-1 rounded-full transition-all duration-300;
}

.password-strength-weak {
    @apply bg-red-500 w-1/4;
}

.password-strength-medium {
    @apply bg-yellow-500 w-2/4;
}

.password-strength-strong {
    @apply bg-green-500 w-full;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive utilities */
@media (max-width: 640px) {
    .card {
        @apply p-4;
    }

    .table th,
    .table td {
        @apply px-2 py-2 text-xs;
    }
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }

    .no-print {
        display: none;
    }
}
