/* Custom styles for GOMTB Admin Dashboard */

/* Navigation styles */
.nav-item {
    @apply w-full text-left transition-colors duration-200;
    color: white !important;
    background-color: transparent;
    padding: 16px 20px;
    margin: 4px 8px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #374151 !important;
    color: white !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-item.active {
    @apply border-r-4 border-orange-500;
    background-color: #374151 !important;
    color: white !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-item i {
    color: #f97316 !important;
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Section visibility */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* Table styles */
.table-row:hover {
    background-color: #f9fafb;
}

/* Status badges */
.status-badge {
    @apply px-2 py-1 text-xs font-medium rounded-full;
}

.status-pending {
    @apply bg-yellow-100 text-yellow-800;
}

.status-completed {
    @apply bg-green-100 text-green-800;
}

.status-failed {
    @apply bg-red-100 text-red-800;
}

.status-active {
    @apply bg-blue-100 text-blue-800;
}

.status-inactive {
    @apply bg-gray-100 text-gray-800;
}

/* Card styles */
.card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200 p-6;
}

.card-header {
    @apply border-b border-gray-200 pb-4 mb-4;
}

.card-title {
    @apply text-lg font-semibold text-gray-900;
}

/* Form styles - Enhanced */
.form-group {
    margin-bottom: 32px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.5;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    background-color: #fffbf5;
}

.form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    background-color: #fffbf5;
}

.form-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.form-section {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 24px;
    letter-spacing: -0.025em;
}

.form-help-text {
    font-size: 14px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.5;
}

/* Button styles */
.btn {
    @apply px-8 py-4 rounded-xl font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2;
    font-size: 16px;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    padding: 16px 24px;
}

.btn-primary {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 16px 24px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-secondary {
    @apply bg-white text-gray-700 border border-gray-300 hover:bg-gray-50 focus:ring-gray-500 shadow-sm;
}

.btn-cancel {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.3);
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 16px 24px;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.4);
    transform: translateY(-2px);
}

.btn-cancel:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.3);
}

.btn-success {
    @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500 shadow-sm hover:shadow;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500 shadow-sm hover:shadow;
}

.btn-sm {
    @apply px-4 py-2 text-sm;
}

.btn-lg {
    @apply px-8 py-4 text-lg;
}

.btn-group {
    @apply flex gap-3;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.btn-group.justify-end {
    @apply justify-end;
}

/* Form button container */
.form-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Button icons */
.btn i {
    font-size: 14px;
}

/* Responsive button adjustments */
@media (max-width: 640px) {
    .btn {
        min-width: 120px;
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .form-buttons,
    .btn-group {
        flex-direction: column-reverse;
        gap: 12px;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Modal styles - Full Screen */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 1000;
    padding: 0;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.modal-header {
    padding: 32px 40px;
    border-bottom: 1px solid #2a2a2a;
    background-color: #121212;
    flex-shrink: 0;
    position: relative;
}

.modal-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.025em;
}

.modal-subtitle {
    font-size: 16px;
    color: #a0a0a0;
    margin: 0;
    font-weight: 400;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background-color: #fafafa;
}

.modal-form-container {
    width: 100%;
    padding: 40px;
    background: white;
    margin: 0;
    border-radius: 0;
}

.modal-close-btn {
    position: absolute;
    top: 32px;
    right: 40px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background-color: #2a2a2a;
    color: #ffffff;
    transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-item {
        @apply text-sm px-3 py-2;
    }
    
    .card {
        @apply p-4;
    }
    
    .btn {
        @apply px-3 py-2 text-sm;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Toast notifications */
.toast {
    @apply fixed top-4 right-4 z-50 p-4 rounded-lg shadow-lg;
    animation: slideIn 0.3s ease-out;
}

.toast-success {
    @apply bg-green-500 text-white;
}

.toast-error {
    @apply bg-red-500 text-white;
}

.toast-warning {
    @apply bg-yellow-500 text-white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Grid layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

/* Image upload styles */
.upload-area {
    @apply border-2 border-dashed border-gray-300 rounded-lg p-6 text-center;
    transition: border-color 0.2s ease;
}

.upload-area:hover {
    @apply border-orange-400;
}

.upload-area.dragover {
    @apply border-orange-500 bg-orange-50;
}

.image-preview {
    margin-top: 1rem;
    text-align: center;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #f97316;
}

/* Search and filter styles */
.search-box {
    @apply relative;
}

.search-box input {
    @apply pl-4 pr-4 py-4 text-base border-2 border-gray-200 rounded-xl bg-white shadow-sm;
    @apply focus:border-orange-500 focus:ring-2 focus:ring-orange-200 focus:outline-none;
    @apply transition-all duration-200 ease-in-out;
    @apply placeholder-gray-400;
    min-height: 56px;
}

.search-box input:hover {
    @apply border-gray-300 shadow-md;
}

.search-box::before {
    display: none;
}

/* Pagination styles */
.pagination {
    @apply flex justify-center items-center space-x-2 mt-6;
}

.pagination button {
    @apply px-3 py-2 border border-gray-300 rounded-md hover:bg-gray-50;
}

.pagination button.active {
    @apply bg-orange-600 text-white border-orange-600;
}

.pagination button:disabled {
    @apply opacity-50 cursor-not-allowed;
}

/* Stats cards */
.stats-card {
    @apply bg-white p-6 rounded-lg shadow-sm border border-gray-200;
}

.stats-card .icon {
    @apply p-3 rounded-full;
}

.stats-card .value {
    @apply text-2xl font-bold;
}

.stats-card .label {
    @apply text-sm text-gray-600;
}

/* Action buttons */
.action-buttons {
    @apply flex space-x-2;
}

.action-btn {
    @apply p-2 rounded-md transition-colors duration-200;
}

.action-btn-edit {
    @apply text-blue-600 hover:bg-blue-50;
}

.action-btn-delete {
    @apply text-red-600 hover:bg-red-50;
}

.action-btn-view {
    @apply text-green-600 hover:bg-green-50;
}

/* Empty state */
.empty-state {
    @apply text-center py-12;
}

.empty-state-icon {
    @apply text-6xl text-gray-300 mb-4;
}

.empty-state-title {
    @apply text-xl font-medium text-gray-900 mb-2;
}

.empty-state-description {
    @apply text-gray-600;
}

/* Table image styles */
.table-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-image-placeholder {
    width: 60px;
    height: 60px;
    background-color: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 24px;
}

.table-row {
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background-color: #f9fafb;
}

/* Admin logo styles */
.admin-logo {
    max-width: 180px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.admin-logo:hover {
    transform: scale(1.05);
}

/* Login screen styles */
.login-logo {
    max-width: 200px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

.login-button {
    background-color: #121212;
    transition: background-color 0.2s ease;
}

.login-button:hover {
    background-color: #2d2d2d;
}