/**
 * GlazierOS Team Management Styles
 * Premium UI matching Quotes v2 & Diary v2 design system
 * 
 * @package GlazierOS
 * @version 1.0.0
 */

/* ============================================================================
   HEADER
   ========================================================================= */

.gst-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.gst-header-left {}

.gst-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.gst-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.gst-header-right {
    display: flex;
    gap: 12px;
}

/* ============================================================================
   BUTTONS
   ========================================================================= */

.gst-btn-primary,
.gst-btn-secondary,
.gst-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gst-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.gst-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.gst-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.gst-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.gst-btn-danger {
    background: white;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.gst-btn-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.gst-btn-card {
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gst-btn-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.gst-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gst-btn-icon:hover {
    background: #f3f4f6;
    color: #374151;
}

.gst-btn-icon.gst-btn-danger {
    color: #ef4444;
}

.gst-btn-icon.gst-btn-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ============================================================================
   FILTERS
   ========================================================================= */

.gst-filters {
    display: flex;
    gap: 16px;
    padding: 0 32px 24px 32px;
    flex-wrap: wrap;
}

.gst-search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.gst-search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.gst-search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.gst-search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gst-filter-select {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gst-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================================================
   STAFF DIRECTORY GRID
   ========================================================================= */

.gst-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 0 32px 32px 32px;
}

.gst-staff-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gst-staff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.gst-card-header {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.gst-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gst-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gst-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.gst-status-active {
    background: #d1fae5;
    color: #065f46;
}

.gst-status-on-leave {
    background: #fef3c7;
    color: #92400e;
}

.gst-status-left {
    background: #fee2e2;
    color: #991b1b;
}

.gst-card-body {
    padding: 20px 24px;
}

.gst-staff-name {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.gst-staff-role {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.gst-role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.gst-staff-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gst-staff-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.gst-staff-meta svg {
    color: #9ca3af;
}

.gst-card-footer {
    padding: 0 24px 20px 24px;
}

/* ============================================================================
   EMPTY STATE
   ========================================================================= */

.gst-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px;
    text-align: center;
}

.gst-empty-state svg {
    color: #d1d5db;
    margin-bottom: 24px;
}

.gst-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.gst-empty-state p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ============================================================================
   PROFILE VIEW
   ========================================================================= */

.gst-profile-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    padding: 0 32px 32px 32px;
}

.gst-profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gst-profile-header {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
}

.gst-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gst-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gst-profile-name {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.gst-profile-role {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
}

.gst-profile-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: capitalize;
    margin-bottom: 24px;
}

.gst-profile-actions {
    display: flex;
    gap: 8px;
}

.gst-profile-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.8125rem;
}

/* ============================================================================
   QUICK STATS
   ========================================================================= */

.gst-quick-stats {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gst-stat-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.gst-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gst-stat-content {
    flex: 1;
}

.gst-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.gst-stat-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* ============================================================================
   TABS
   ========================================================================= */

.gst-profile-main {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.gst-tabs-container {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.gst-tabs {
    display: flex;
    padding: 0 24px;
}

.gst-tab {
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.gst-tab:hover {
    color: #374151;
    background: rgba(102, 126, 234, 0.05);
}

.gst-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.gst-tab-content {
    padding: 32px;
}

.gst-tab-panel {
    display: none;
}

.gst-tab-panel.active {
    display: block;
}

/* ============================================================================
   OVERVIEW TAB
   ========================================================================= */

.gst-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.gst-info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
}

.gst-info-card.gst-card-full {
    grid-column: 1 / -1;
}

.gst-info-card h3 {
    margin: 0 0 20px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.gst-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.gst-info-row:last-child {
    border-bottom: none;
}

.gst-info-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.gst-info-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 600;
}

.gst-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gst-event-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.gst-event-date {
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    min-width: 80px;
}

.gst-event-details {
    flex: 1;
}

.gst-event-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.gst-event-time {
    font-size: 0.8125rem;
    color: #6b7280;
}

.gst-empty-text {
    color: #9ca3af;
    font-size: 0.875rem;
    text-align: center;
    padding: 20px;
}

/* ============================================================================
   AVAILABILITY TAB
   ========================================================================= */

.gst-availability-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gst-availability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gst-availability-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.gst-availability-calendar {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
}

.gst-placeholder {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0 0 8px 0;
}

.gst-placeholder-note {
    font-size: 0.875rem;
    color: #d1d5db;
    margin: 0;
}

.gst-availability-summary h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.gst-leave-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gst-leave-stat {
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
}

.gst-leave-label {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.gst-leave-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.gst-leave-value.gst-highlight {
    color: #667eea;
}

/* ============================================================================
   DOCUMENTS TAB
   ========================================================================= */

.gst-documents-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gst-documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gst-documents-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.gst-documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gst-document-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.gst-document-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gst-document-icon {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.gst-document-info {
    flex: 1;
}

.gst-document-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.gst-document-info p {
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
}

.gst-document-actions {
    display: flex;
    gap: 8px;
}

/* ============================================================================
   NOTES TAB
   ========================================================================= */

.gst-notes-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gst-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gst-notes-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.gst-notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gst-note-item {
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.gst-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.gst-note-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.gst-note-date {
    font-size: 0.8125rem;
    color: #6b7280;
}

.gst-note-body {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 12px;
}

.gst-note-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #ddd6fe;
    color: #5b21b6;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================================================
   PAY TAB
   ========================================================================= */

.gst-pay-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gst-pay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gst-pay-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.gst-pay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gst-pay-card {
    padding: 24px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.gst-pay-card h4 {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gst-pay-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.gst-pay-note {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin: 0;
}

.gst-hours-log {
    padding: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.gst-hours-log h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

/* ============================================================================
   MODAL
   ========================================================================= */

.gst-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.gst-modal {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gst-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.gst-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.gst-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gst-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.gst-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.gst-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px 32px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* ============================================================================
   FORMS
   ========================================================================= */

.gst-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.gst-form-group {
    display: flex;
    flex-direction: column;
}

.gst-form-group label {
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.gst-input {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    transition: all 0.2s ease;
}

.gst-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 1200px) {
    .gst-profile-container {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 992px) {
    .gst-profile-container {
        grid-template-columns: 1fr;
    }
    
    .gst-staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .gst-overview-grid {
        grid-template-columns: 1fr;
    }
    
    .gst-pay-grid {
        grid-template-columns: 1fr;
    }
    
    .gst-leave-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .gst-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .gst-filters {
        flex-direction: column;
    }
    
    .gst-search-box {
        min-width: 100%;
    }
    
    .gst-form-row {
        grid-template-columns: 1fr;
    }
}

/* PTO Bar on Staff Cards */
.gst-pto-bar {
    height: 4px;
    background: #f3f4f6;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.gst-pto-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
