/**
 * Admin Panel Styles
 * 
 * Additional styles for admin dashboard and management pages.
 */

/* ===================================
   Admin Login Page
   =================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-box {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--light-text);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form input {
    padding: 1rem;
}

.login-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.back-home {
    text-align: center;
    margin-top: 1.5rem;
}

.back-home a {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* ===================================
   Admin Dashboard
   =================================== */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 300px);
}

.admin-sidebar {
    width: 250px;
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.admin-logo h2 {
    color: var(--white);
    font-size: 1.5rem;
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 0.5rem;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.admin-menu a:hover,
.admin-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-menu i {
    width: 20px;
    text-align: center;
}

.admin-content {
    margin-left: 250px;
    flex: 1;
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
}

.admin-header {
    background-color: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user span {
    color: var(--light-text);
}

.logout-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.admin-main {
    padding: 2rem;
    flex: 1;
}

/* ===================================
   Admin Cards and Widgets
   =================================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.stat-icon.blue {
    background-color: var(--secondary-color);
}

.stat-icon.green {
    background-color: #27ae60;
}

.stat-icon.orange {
    background-color: #f39c12;
}

.stat-icon.red {
    background-color: var(--accent-color);
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* ===================================
   Admin Tables
   =================================== */
.admin-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-card-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.admin-table thead {
    background-color: var(--light-bg);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--primary-color);
}

.admin-table tbody tr:hover {
    background-color: var(--light-bg);
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 0.4rem 0.6rem;
}

/* ===================================
   Status Badges
   =================================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ===================================
   Alert Messages
   =================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert i {
    font-size: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ===================================
   Image Preview
   =================================== */
.image-preview {
    margin-top: 1rem;
}

.image-preview img {
    max-width: 300px;
    max-height: 200px;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.current-image {
    margin-bottom: 1rem;
}

.current-image img {
    max-width: 200px;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

/* ===================================
   File Upload
   =================================== */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.file-upload-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-label:hover {
    background-color: #2980b9;
}

.file-name {
    margin-top: 0.5rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

/* ===================================
   Responsive Admin
   =================================== */

/* ===================================
   Admin Footer Styles
   =================================== */
.admin-footer {
    background: linear-gradient(135deg, #0d2b3e 0%, #1a4d6d 100%);
    color: #ffffff;
    padding: 2rem 0 1rem;
    border-top: 4px solid #f39c12;
    width: 100%;
    clear: both;
}

.admin-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.admin-footer .footer-registration {
    text-align: center;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-footer .acnc-badge {
    margin-bottom: 1rem;
}

.admin-footer .acnc-badge img {
    transition: var(--transition);
    filter: brightness(1.1);
    max-width: 100%;
    height: auto;
}

.admin-footer .acnc-badge img:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.admin-footer .abn-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.admin-footer .abn-info strong {
    color: #f39c12;
}

.admin-footer .footer-bottom {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.admin-footer .footer-bottom p {
    margin: 0.5rem 0;
}

.admin-footer .developer-link {
    color: #f39c12;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.admin-footer .developer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f39c12;
    transition: width 0.3s ease;
}

.admin-footer .developer-link:hover::after {
    width: 100%;
}

.admin-footer .developer-link:hover {
    color: #ffeaa7;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

/* Admin Logo Styling */
.admin-logo {
    text-align: center;
}

.admin-logo img {
    display: block;
    margin: 0 auto 0.5rem;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: white;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-logo h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--white);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.25rem;
}

/* Enhanced Mobile Responsiveness for Admin */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .admin-header {
        padding-left: 4rem;
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1rem 1rem 4rem;
    }
    
    .admin-title h1 {
        font-size: 1.5rem;
    }
    
    .admin-user {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 0.85rem;
        overflow-x: auto;
        display: block;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
    
    .admin-footer .acnc-badge img {
        height: 50px !important;
    }
    
    .admin-footer-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .admin-title h1 {
        font-size: 1.25rem;
    }
    
    .admin-footer .footer-bottom {
        font-size: 0.75rem;
    }
    
    .admin-footer .acnc-badge img {
        height: 40px !important;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ===================================
   Project Management Styles
   =================================== */

/* Project Form */
.project-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    padding: 2rem 0;
    border-top: 1px solid #eee;
}

/* Project Table */
.project-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
}

.category-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.project-location {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-top: 0.25rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-draft {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-paused {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-info {
    background: #007bff;
}

.progress-warning {
    background: #ffc107;
}

.progress-success {
    background: #28a745;
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    min-width: 35px;
}

/* Date Info */
.date-info {
    font-size: 0.85rem;
    line-height: 1.4;
}

.date-info div {
    white-space: nowrap;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.status-select {
    font-size: 0.75rem;
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 80px;
}

/* Filters */
.filters-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Image Previews */
.preview-image {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1rem 0;
    border: 2px solid #f0f0f0;
}

.current-image {
    text-align: center;
    margin-bottom: 1rem;
}

.current-image p {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-top: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--light-text);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

.pagination-info {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-form {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .project-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .project-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .progress-container {
        min-width: 100px;
    }
}
