/* Trans Wave Marine Frontend Styles */

.twm-frontend-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8fafc;
    min-height: 100vh;
}

/* Header Styles */
.twm-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.twm-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.twm-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.twm-logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.twm-logo-text h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.twm-logo-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.2;
}

.twm-header-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Welcome Section */
.twm-welcome {
    text-align: center;
    margin-bottom: 40px;
}

.twm-welcome h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.twm-welcome p {
    font-size: 18px;
    color: #64748b;
    margin: 0 0 20px 0;
}

.twm-status-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Badge Styles */
.twm-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.twm-badge-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.twm-badge-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.twm-badge-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.twm-badge-error {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Statistics Grid */
.twm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.twm-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.twm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.twm-stat-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.twm-stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.twm-stat-info p {
    font-size: 14px;
    color: #64748b;
    margin: 5px 0 0 0;
}

.twm-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1e40af;
}

.twm-stat-icon-success {
    background: #dcfce7;
    color: #166534;
}

.twm-stat-icon-warning {
    background: #fef3c7;
    color: #92400e;
}

.twm-stat-icon-info {
    background: #e0e7ff;
    color: #4338ca;
}

.twm-stat-icon .dashicons {
    font-size: 24px;
}

.twm-stat-change {
    font-size: 12px;
    color: #64748b;
}

/* Tabs */
.twm-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.twm-tab-nav {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.twm-tab-button {
    background: none;
    border: none;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.twm-tab-button:hover {
    color: #1e40af;
    background: #f1f5f9;
}

.twm-tab-button.active {
    color: #1e40af;
    background: white;
    border-bottom-color: #1e40af;
}

.twm-tab-content {
    display: none;
    padding: 30px;
}

.twm-tab-content.active {
    display: block;
}

/* Cards */
.twm-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.twm-card-header {
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.twm-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.twm-card-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px 0;
}

.twm-card-content {
    padding: 0 24px 24px 24px;
}

/* Vessel Items */
.twm-vessel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.twm-vessel-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.twm-vessel-item:last-child {
    margin-bottom: 0;
}

.twm-vessel-info {
    flex: 1;
}

.twm-vessel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.twm-vessel-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.twm-flag {
    font-size: 12px;
    color: #64748b;
}

.twm-vessel-details {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #64748b;
    flex-wrap: wrap;
}

.twm-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.twm-progress-bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    max-width: 200px;
}

.twm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.twm-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    min-width: 35px;
}

.twm-vessel-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Buttons */
.twm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.twm-btn-primary {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

.twm-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.twm-btn-outline {
    background: transparent;
    color: #1e40af;
    border-color: #1e40af;
}

.twm-btn-outline:hover {
    background: #1e40af;
    color: white;
}

/* Modules Grid */
.twm-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.twm-module-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    text-align: center;
}

.twm-module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #1e40af;
}

.twm-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.twm-module-icon {
    font-size: 32px;
    color: #1e40af;
}

.twm-module-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.twm-module-card p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* SOP Grid */
.twm-sop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.twm-sop-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.twm-sop-btn:hover {
    background: #f8fafc;
    border-color: #1e40af;
    transform: translateY(-1px);
}

.twm-sop-btn strong {
    color: #1e293b;
    font-size: 16px;
}

.twm-sop-btn span {
    color: #64748b;
    font-size: 12px;
}

/* Documents */
.twm-documents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.twm-document-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.twm-document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.twm-document-info strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
}

.twm-document-info span {
    color: #64748b;
    font-size: 12px;
}

.twm-template-grid {
    display: grid;
    gap: 12px;
}

.twm-template-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.twm-template-btn:hover {
    background: #f8fafc;
    border-color: #1e40af;
}

.twm-template-btn strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 4px;
}

.twm-template-btn span {
    color: #64748b;
    font-size: 12px;
}

/* Compliance */
.twm-compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.twm-compliance-item {
    text-align: center;
}

.twm-compliance-item h4 {
    font-size: 32px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 8px 0;
}

.twm-compliance-item p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px 0;
}

/* Empty State */
.twm-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.twm-empty-state .dashicons {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.twm-empty-state h4 {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.twm-empty-state p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .twm-frontend-dashboard {
        padding: 15px;
    }
    
    .twm-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .twm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .twm-tab-nav {
        flex-direction: column;
    }
    
    .twm-tab-button {
        text-align: center;
    }
    
    .twm-vessel-item {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .twm-vessel-actions {
        justify-content: center;
    }
    
    .twm-documents-grid {
        grid-template-columns: 1fr;
    }
    
    .twm-compliance-grid {
        grid-template-columns: 1fr;
    }
    
    .twm-modules-grid {
        grid-template-columns: 1fr;
    }
}