/* Admin Panel - index.html specific styles */

/* Payment Modal Breakdown */
.breakdown-section {
    background: var(--surface-1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.breakdown-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.breakdown-card {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}

.breakdown-card .label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
}

.breakdown-card .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.breakdown-card.success {
    border-left-color: var(--success);
}

.breakdown-card.success .value {
    color: var(--success);
}

.breakdown-card.warning {
    border-left-color: var(--warning);
}

.breakdown-card.warning .value {
    color: var(--warning);
}

.breakdown-card.danger {
    border-left-color: var(--danger);
}

.breakdown-card.danger .value {
    color: var(--danger);
}

.breakdown-card.purple {
    border-left-color: #7c3aed;
}

.breakdown-card.purple .value {
    color: #7c3aed;
    font-size: 16px;
}

.breakdown-card.red {
    border-left-color: #dc2626;
}

.breakdown-card.red .value {
    color: #dc2626;
}

/* Payment Records List */
.payment-list {
    background: var(--surface-1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.payment-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-item .date {
    font-weight: 600;
    color: var(--primary);
}

.payment-item .amount {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Pack List */
.pack-list {
    background: var(--surface-1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.pack-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pack-item .info {
    flex: 1;
}

.pack-item .name {
    font-weight: 600;
    color: var(--primary);
}

.pack-item .price {
    font-size: 12px;
    color: var(--text-secondary);
}

.pack-item .actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Payment Form Grid */
.payment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* Payment Summary Grid */
.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Student Detail Modal */
.detail-header {
    background: linear-gradient(135deg, var(--primary), #0d3b66);
    padding: 30px;
    color: white;
    text-align: center;
}

.detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 32px;
    font-weight: 700;
}

.detail-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
}

.detail-badge {
    opacity: 0.85;
    font-size: 13px;
}

.detail-body {
    padding: 20px 25px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.detail-info-box {
    background: var(--surface-1);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.detail-info-box .label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-info-box .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.detail-stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px 8px;
    text-align: center;
}

.detail-stat .label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.detail-stat .value {
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
}

.detail-stat.primary {
    border-top: 3px solid var(--primary);
}

.detail-stat.primary .value {
    color: var(--primary);
}

.detail-stat.success {
    border-top: 3px solid var(--success);
}

.detail-stat.success .value {
    color: var(--success);
}

.detail-stat.danger {
    border-top: 3px solid var(--danger);
}

.detail-stat.danger .value {
    color: var(--danger);
}

.detail-stat.warning {
    border-top: 3px solid var(--warning);
}

.detail-stat.warning .value {
    color: var(--warning);
}

.detail-pricing {
    background: var(--surface-1);
    border-radius: 10px;
    padding: 15px;
}

/* Edit Class Modal */
.edit-student-list {
    background: var(--surface-1);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.edit-student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    margin-bottom: 4px;
}

/* Search Select */
.search-select-wrapper {
    position: relative;
}

.search-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Attendance Badge */
.attendance-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    margin: 2px;
    font-size: 11px;
}

.attendance-badge span {
    font-weight: 600;
}

/* Config Tabs */
.config-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.config-tab {
    flex: 1;
}

/* Registration Fee Section */
.registration-section {
    margin-bottom: 30px;
}

.registration-input {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.registration-input>div {
    flex: 1;
}

.registration-input label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.registration-input input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

/* Utility classes used in index.html */
.btn-mb {
    margin-bottom: 20px;
}

.card-mb {
    margin-bottom: 30px;
}

.config-subtitle {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.metrics-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.metric-flex {
    flex: 1;
    min-width: 220px;
}

.professor-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Schedule Module */
.attendance-badge-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    margin: 2px;
    font-size: 11px;
}

.attendance-badge-wrapper span {
    font-weight: 600;
}

.attendance-select {
    border: none;
    background: transparent;
    font-size: 10px;
    cursor: pointer;
    padding: 2px;
    font-weight: 700;
}

.slot-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 11px;
}

.slot-edit-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.slot-edit-input {
    width: 100%;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
}

.slot-edit-field {
    margin-bottom: 8px;
    font-size: 11px;
}

.slot-edit-textarea {
    width: 100%;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    resize: vertical;
    min-height: 50px;
}

/* Prices Module */
.prices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.prices-table th {
    padding: 12px;
    text-align: center;
}

.prices-table th:first-child {
    text-align: left;
}

.prices-table td {
    padding: 12px;
    text-align: center;
}

.prices-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.prices-table thead {
    background: var(--primary);
}

.price-input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    font-family: inherit;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.pack-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
}

.pack-card .name {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 14px;
}

.pack-card .desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
}

.pack-card .prices {
    background: var(--surface-1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pack-card .price-box {
    text-align: center;
}

.pack-card .price-label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 5px;
}

.pack-card .price-value {
    font-size: 16px;
    font-weight: 700;
}

.pack-card .price-sem {
    color: var(--danger);
}

.pack-card .price-com {
    color: var(--success);
}

.pack-card .actions {
    display: flex;
    gap: 5px;
}

.pack-card .cycles {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Student Detail */
.student-detail-body {
    padding: 20px 25px;
}

.student-section-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 15px;
}

.student-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.student-pricing-box {
    background: var(--surface-1);
    padding: 12px;
    border-radius: 8px;
}

.student-pricing-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.student-pricing-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Additional Schedule Classes */
.slot-edit-label-block {
    display: block;
    margin-bottom: 4px;
}

.slot-notice {
    background: var(--surface-2);
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.slot-notice-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--warning);
}

.btn-action {
    padding: 4px 8px;
    font-size: 10px;
    flex: 1;
}

.price-box-border {
    border-left: 1px solid var(--border);
}

.empty-message {
    text-align: center;
    color: var(--text-secondary);
}

.empty-slot-text {
    color: var(--text-secondary);
    font-size: 11px;
}