/* /all/teacher/style.css */

/* Modern Green-White Theme */
.gradient-bg {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Hero Section - ตามรูป */
.hero-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 10px 25px -5px rgba(34, 197, 94, 0.1);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #16a34a;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    color: #15803d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

/* Stats - ตามรูป */
.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-item {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.stat-bullet {
    color: #16a34a;
    font-size: 1.5rem;
    margin-right: 1rem;
    line-height: 1;
}

.stat-label {
    color: #374151;
    min-width: 120px;
}

.stat-value {
    font-weight: 700;
    color: #16a34a;
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.stat-unit {
    color: #9ca3af;
    font-size: 1rem;
}

/* Search Dropdown */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

.search-select {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-right: 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    color: #1f2937;
    font-weight: 500;
}

.search-select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-select:hover {
    border-color: #22c55e;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #22c55e;
    pointer-events: none;
}

/* Group Header Card */
.group-header-card {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.3);
}

.group-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.group-stats {
    display: flex;
    gap: 2rem;
}

.group-stat-item {
    text-align: center;
}

.group-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.group-stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.change-group-btn {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.change-group-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Staff Card */
.staff-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.1);
    transition: all 0.3s ease;
}

.staff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(34, 197, 94, 0.1), 0 10px 10px -5px rgba(34, 197, 94, 0.04);
    border-color: rgba(34, 197, 94, 0.3);
}

.staff-image-container {
    padding: 2rem 1.5rem 1rem 1.5rem;
    display: flex;
    justify-content: center;
    background: linear-gradient(to bottom, #f0fdf4, #ffffff);
}

.staff-image-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
}

.staff-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 4px #f0fdf4;
}

.staff-card:hover .staff-image {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 4px #22c55e;
}

.position-badge {
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.875rem;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    white-space: nowrap;
    border: 1px solid #bbf7d0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-weight: 500;
}

.staff-info {
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    text-align: center;
}

.staff-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.125rem;
    line-height: 1.4;
}

/* Staff Grid - จัดกึ่งกลาง */
.staff-grid-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1.5rem;
    border: 2px dashed #22c55e;
    max-width: 600px;
    margin: 2rem auto;
}

.empty-state svg {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    color: #86efac;
}

.empty-state h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 3px solid #f0fdf4;
    border-radius: 50%;
    border-top-color: #22c55e;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .stat-item {
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .group-header-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .group-stats {
        justify-content: center;
    }
}
/* เพิ่มใน style */
.staff-item {
    transition: all 0.2s ease;
}

.staff-item:hover {
    background-color: #f0fdf4;
    transform: translateX(4px);
}

/* เส้นคั่นระหว่างรายชื่อ */
.divide-y-green-100 > :not([hidden]) ~ :not([hidden]) {
    border-top-width: 1px;
    border-color: #dcfce7;
}

/* Group header gradient */
.bg-gradient-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
/* =========================
   SEARCH + FILTER
========================= */

.search-filter-container {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid rgba(34,197,94,0.2);
    margin-bottom: 2rem;
}

.search-input {
    width:100%;
    padding:0.75rem 1rem 0.75rem 2.5rem;
    border:1px solid #e5e7eb;
    border-radius:0.75rem;
    transition:all .2s ease;
    font-size:1rem;
}

.search-input:focus{
    outline:none;
    border-color:#22c55e;
    box-shadow:0 0 0 3px rgba(34,197,94,.1);
}

.search-input.has-value{
    border-color:#22c55e;
    background:#f0fdf4;
}

.group-select{
    padding:0.75rem 2rem 0.75rem 1rem;
    border:1px solid #e5e7eb;
    border-radius:0.75rem;
    background:white;
    cursor:pointer;
    min-width:220px;
    font-size:1rem;
}

.group-select:focus{
    outline:none;
    border-color:#22c55e;
    box-shadow:0 0 0 3px rgba(34,197,94,.1);
}

.reset-btn{
    padding:.75rem;
    border:1px solid #e5e7eb;
    border-radius:.75rem;
    background:white;
    color:#6b7280;
    transition:.2s;
    cursor:pointer;
}

.reset-btn:hover{
    background:#f0fdf4;
    color:#22c55e;
    border-color:#22c55e;
}

.clear-search-btn{
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    background:none;
    border:none;
    color:#9ca3af;
    cursor:pointer;
    padding:.25rem;
    display:none;
}

.clear-search-btn:hover{
    color:#22c55e;
}

.search-input:not(:placeholder-shown)+.clear-search-btn{
    display:block;
}

/* =========================
   STAFF CARD EFFECT
========================= */

.staff-card.search-highlight{
    animation:highlightPulse 1s ease;
}

@keyframes highlightPulse{
    0%,100%{transform:scale(1)}
    50%{
        transform:scale(1.02);
        background:#f0fdf4;
    }
}

.staff-position{
    color:#6b7280;
    font-size:.875rem;
    margin-top:.25rem;
    line-height:1.4;
}

/* =========================
   PAGINATION
========================= */

.pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:.5rem;
    margin-top:3rem;
    flex-wrap:wrap;
}

.pagination-item{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:2.5rem;
    height:2.5rem;
    padding:0 .5rem;
    border-radius:.75rem;
    background:white;
    border:1px solid #e5e7eb;
    color:#4b5563;
    font-weight:500;
    transition:.2s;
    cursor:pointer;
    text-decoration:none;
}

.pagination-item:hover:not(.active):not(.disabled){
    background:#f0fdf4;
    border-color:#22c55e;
    color:#22c55e;
}

.pagination-item.active{
    background:linear-gradient(135deg,#22c55e,#16a34a);
    border-color:#16a34a;
    color:white;
}

.pagination-item.disabled{
    opacity:.5;
    cursor:not-allowed;
    pointer-events:none;
}

.pagination-dots{
    color:#6b7280;
    padding:0 .25rem;
}

/* =========================
   SEARCH RESULT
========================= */

.search-result-badge{
    background:#f0fdf4;
    color:#16a34a;
    padding:.5rem 1rem;
    border-radius:2rem;
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    font-size:.875rem;
    border:1px solid #22c55e;
    animation:slideDown .3s ease;
}

@keyframes slideDown{
    from{
        opacity:0;
        transform:translateY(-10px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* =========================
   NO RESULT
========================= */

.no-results{
    text-align:center;
    padding:3rem;
    background:white;
    border-radius:1rem;
    border:1px solid #e5e7eb;
}

.no-results svg{
    width:4rem;
    height:4rem;
    margin:0 auto 1rem;
    color:#d1d5db;
}

.no-results h3{
    font-size:1.25rem;
    color:#374151;
    margin-bottom:.5rem;
}

.no-results p{
    color:#6b7280;
}

/* =========================
   SEARCH STATS
========================= */

.search-stats{
    background:white;
    border-radius:.75rem;
    padding:1rem;
    margin-bottom:1rem;
    border:1px solid #e5e7eb;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:1rem;
}

.search-info{
    color:#4b5563;
    font-size:.95rem;
}

.search-info strong{
    color:#22c55e;
    font-weight:600;
}

.clear-search-link{
    color:#22c55e;
    text-decoration:none;
    font-size:.875rem;
    display:inline-flex;
    align-items:center;
    gap:.25rem;
    padding:.25rem .75rem;
    border-radius:9999px;
    background:#f0fdf4;
    border:1px solid #22c55e;
    transition:.2s;
}

.clear-search-link:hover{
    background:white;
    color:#16a34a;
}
