/* Admin Dashboard Styles */

.admin-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, var(--ocean-deep) 100%);
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.admin-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/nautical-map.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
}

.admin-hero i {
    animation: rotate-gear 4s linear infinite;
}

@keyframes rotate-gear {
    100% {
        transform: rotate(360deg);
    }
}

/* Admin Section */
.admin-section {
    background: var(--sand-light);
    min-height: 100vh;
}

/* Admin Stat Cards */
.admin-stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.admin-stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow);
}

.admin-stat-card i {
    font-size: 3rem;
    color: var(--ocean-light);
    margin-bottom: 1rem;
}

.admin-stat-card.active {
    border-color: #ffc107;
}

.admin-stat-card.active i {
    color: #ffc107;
}

.admin-stat-card.completed {
    border-color: #28a745;
}

.admin-stat-card.completed i {
    color: #28a745;
}

.admin-stat-card.pending {
    border-color: var(--gray-medium);
}

.admin-stat-card.pending i {
    color: var(--gray-medium);
}

.admin-stat-card h3 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ocean-deep);
    margin-bottom: 0.5rem;
}

.admin-stat-card p {
    color: var(--ocean-medium);
    margin: 0;
    font-weight: 600;
}

/* Action Bar */
.action-bar {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-bar .btn {
    flex: 1;
    min-width: 200px;
}

/* Projects Container */
.projects-container {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.projects-container h3 {
    color: var(--ocean-deep);
    font-weight: 700;
}

/* Project Card */
.project-card {
    background: var(--gray-light);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    border-left: 5px solid var(--ocean-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    background: var(--white);
    box-shadow: 0 10px 30px var(--shadow);
    transform: translateX(10px);
}

.project-card.status-in-progress {
    border-left-color: #ffc107;
}

.project-card.status-completed {
    border-left-color: #28a745;
}

.project-card.status-pending {
    border-left-color: var(--gray-medium);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-card-title {
    color: var(--ocean-deep);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-card-meta {
    color: var(--ocean-medium);
    font-size: 0.95rem;
}

.project-card-meta i {
    margin-right: 0.5rem;
}

.project-card-actions {
    display: flex;
    gap: 0.5rem;
}

.project-card-actions .btn {
    padding: 0.5rem 1rem;
}

.project-card-progress {
    margin-top: 1rem;
}

.project-card-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--ocean-medium);
}

.project-card-progress-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.project-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ocean-light), var(--ocean-sky));
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Editor Modal */
.modal-xl {
    max-width: 1200px;
}

.editor-section {
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.editor-section h4 {
    color: var(--ocean-deep);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.editor-section h4 i {
    margin-right: 0.5rem;
}

/* Milestone Item */
.milestone-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.milestone-item:hover {
    border-color: var(--ocean-light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.milestone-item-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.milestone-number {
    width: 40px;
    height: 40px;
    background: var(--ocean-light);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 1rem;
}

.milestone-item.status-completed .milestone-number {
    background: #28a745;
}

.milestone-item.status-in-progress .milestone-number {
    background: #ffc107;
}

.milestone-item.status-pending .milestone-number {
    background: var(--gray-medium);
}

.milestone-delete {
    margin-left: auto;
}

/* Photo Item */
.photo-item-editor {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.photo-item-editor:hover {
    border-color: var(--ocean-light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.photo-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.photo-preview {
    width: 100px;
    height: 100px;
    background: var(--gray-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 1rem;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview i {
    font-size: 2rem;
    color: var(--ocean-light);
}

/* Note Item */
.note-item-editor {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.note-item-editor:hover {
    border-color: var(--ocean-light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: var(--ocean-deep);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ocean-light);
    box-shadow: 0 0 0 0.2rem rgba(5, 191, 219, 0.25);
}

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.status-in-progress {
    background: #ffc107;
    color: var(--white);
}

.status-badge.status-completed {
    background: #28a745;
    color: var(--white);
}

.status-badge.status-pending {
    background: var(--gray-medium);
    color: var(--white);
}

/* Buttons */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc3545;
    border: none;
}

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

.btn-warning {
    background: #ffc107;
    border: none;
    color: var(--white);
}

.btn-warning:hover {
    background: #e0a800;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card,
.milestone-item,
.photo-item-editor,
.note-item-editor {
    animation: slideIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .action-bar {
        flex-direction: column;
    }
    
    .action-bar .btn {
        width: 100%;
    }
    
    .project-card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .project-card-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .admin-stat-card {
        margin-bottom: 1rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--ocean-medium);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Success Toast */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--white);
    border-left: 5px solid var(--ocean-light);
    box-shadow: 0 10px 30px var(--shadow);
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--gray-light);
    border-top-color: var(--ocean-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Login Screen Styles */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #06b6d4 100%);
    background-image: 
        url('../images/nautical-map.jpg'),
        linear-gradient(135deg, rgba(12, 74, 110, 0.95) 0%, rgba(14, 116, 144, 0.95) 50%, rgba(6, 182, 212, 0.95) 100%);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-card h2 {
    color: #0c4a6e;
    font-weight: 700;
}

.login-card .form-label {
    color: #0e7490;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-card .input-group-text {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border: none;
}

.login-card .form-control {
    border: 2px solid #e0f2fe;
    padding: 12px;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

.login-card .btn-primary {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    border: none;
    padding: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}

#loginError {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Logout Button */
#logoutBtn {
    transition: all 0.3s ease;
}

#logoutBtn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
