/* Alumni Yayasan Terengganu - Shared Styles */

:root {
    --yt-primary: #1e3a8a;
    --yt-secondary: #3b82f6;
    --yt-accent: #bfdbfe;
    --yt-gold: #fbbf24;
    --yt-success: #10b981;
    --yt-danger: #ef4444;
    --yt-warning: #f59e0b;
    --yt-light: #f7f9fc;
    --yt-dark: #1f2937;
    --yt-shadow: rgba(30, 58, 138, 0.15);
    --yt-shadow-hover: rgba(30, 58, 138, 0.25);
}

/* Page Layout */
.yt-page-header {
    background: linear-gradient(135deg, var(--yt-primary) 0%, var(--yt-secondary) 100%);
    color: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.yt-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/><circle cx="90" cy="50" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.yt-page-header * {
    position: relative;
    z-index: 2;
}

.yt-page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.yt-page-title i {
    margin-right: 15px;
    color: var(--yt-gold);
    font-size: 36px;
}

.yt-page-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Cards */
.yt-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--yt-shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.yt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px var(--yt-shadow-hover);
}

.yt-card-title {
    color: var(--yt-primary);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--yt-accent);
}

.yt-card-title i {
    margin-right: 12px;
    color: var(--yt-gold);
    font-size: 24px;
}

/* Forms */
.yt-form-group {
    margin-bottom: 25px;
}

.yt-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--yt-dark);
    font-size: 14px;
}

.yt-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.yt-form-control:focus {
    outline: none;
    border-color: var(--yt-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.yt-form-control.is-invalid {
    border-color: var(--yt-danger);
}

.yt-form-control.is-valid {
    border-color: var(--yt-success);
}

.yt-invalid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--yt-danger);
}

.yt-valid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--yt-success);
}

.yt-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

.yt-form-select:focus {
    outline: none;
    border-color: var(--yt-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Buttons */
.yt-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.yt-btn i {
    margin-right: 8px;
}

.yt-btn-primary {
    background: linear-gradient(135deg, var(--yt-primary) 0%, var(--yt-secondary) 100%);
    color: white;
}

.yt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--yt-shadow);
    color: white;
    text-decoration: none;
}

.yt-btn-success {
    background: linear-gradient(135deg, var(--yt-success) 0%, #059669 100%);
    color: white;
}

.yt-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    color: white;
    text-decoration: none;
}

.yt-btn-danger {
    background: linear-gradient(135deg, var(--yt-danger) 0%, #dc2626 100%);
    color: white;
}

.yt-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    color: white;
    text-decoration: none;
}

.yt-btn-outline {
    background: transparent;
    border: 2px solid var(--yt-primary);
    color: var(--yt-primary);
}

.yt-btn-outline:hover {
    background: var(--yt-primary);
    color: white;
    text-decoration: none;
}

.yt-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* Tables */
.yt-table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--yt-shadow);
    margin-bottom: 30px;
    padding: 15px;
}

.yt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.yt-table thead {
    background: linear-gradient(135deg, var(--yt-primary) 0%, var(--yt-secondary) 100%);
    color: white;
}

.yt-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yt-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.yt-table tbody tr:hover {
    background-color: var(--yt-light);
}

.yt-table tbody tr:last-child td {
    border-bottom: none;
}

/* Action Buttons in Tables */
.yt-table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.yt-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

/* Status Badges */
.yt-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.yt-badge-primary {
    background: var(--yt-primary);
    color: white;
}

.yt-badge-success {
    background: var(--yt-success);
    color: white;
}

.yt-badge-warning {
    background: var(--yt-warning);
    color: white;
}

.yt-badge-danger {
    background: var(--yt-danger);
    color: white;
}

/* Empty States */
.yt-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.yt-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--yt-primary);
}

.yt-empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--yt-dark);
}

.yt-empty-text {
    font-size: 14px;
    margin-bottom: 25px;
}

/* Alerts */
.yt-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.yt-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--yt-success);
    color: var(--yt-success);
}

.yt-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--yt-danger);
    color: var(--yt-danger);
}

.yt-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--yt-warning);
    color: var(--yt-warning);
}

.yt-alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--yt-secondary);
    color: var(--yt-secondary);
}

/* File Upload */
.yt-file-upload {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.yt-file-upload:hover {
    border-color: var(--yt-primary);
    background: rgba(30, 58, 138, 0.02);
}

.yt-file-upload.dragover {
    border-color: var(--yt-primary);
    background: rgba(30, 58, 138, 0.05);
}

.yt-file-upload-icon {
    font-size: 48px;
    color: var(--yt-primary);
    margin-bottom: 15px;
}

.yt-file-upload-text {
    font-size: 16px;
    color: var(--yt-dark);
    margin-bottom: 5px;
}

.yt-file-upload-hint {
    font-size: 12px;
    color: #6c757d;
}

/* Modal Overlay */
.yt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.yt-modal {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.yt-modal-header {
    padding: 25px 30px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 25px;
}

.yt-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--yt-primary);
    margin-bottom: 15px;
}

.yt-modal-body {
    padding: 0 30px;
}

.yt-modal-footer {
    padding: 25px 30px;
    border-top: 1px solid #e9ecef;
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Navigation Breadcrumb */
.yt-breadcrumb {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.yt-breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.yt-breadcrumb-item {
    display: flex;
    align-items: center;
}

.yt-breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: #6c757d;
}

.yt-breadcrumb-link {
    color: var(--yt-primary);
    text-decoration: none;
    font-weight: 500;
}

.yt-breadcrumb-link:hover {
    text-decoration: underline;
}

.yt-breadcrumb-current {
    color: #6c757d;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .yt-page-header {
        padding: 20px;
        text-align: center;
    }

    .yt-page-title {
        font-size: 24px;
        flex-direction: column;
        text-align: center;
    }

    .yt-page-title i {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .yt-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .yt-card-title {
        font-size: 18px;
        flex-direction: column;
        text-align: center;
    }

    .yt-card-title i {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .yt-btn-group {
        flex-direction: column;
    }

    .yt-btn {
        width: 100%;
        justify-content: center;
    }

    .yt-table-container {
        overflow-x: auto;
    }

    .yt-table {
        min-width: 600px;
    }

    .yt-modal {
        width: 95%;
        margin: 20px;
    }

    .yt-modal-header,
    .yt-modal-body,
    .yt-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .yt-page-header {
        padding: 15px;
    }

    .yt-card {
        padding: 15px;
    }

    .yt-form-control,
    .yt-form-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Animation Classes */
.yt-fade-in {
    animation: ytFadeIn 0.5s ease-in-out;
}

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

.yt-slide-up {
    animation: ytSlideUp 0.3s ease-out;
}

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

/* Loading States */
.yt-loading {
    position: relative;
    overflow: hidden;
}

.yt-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: ytLoading 1.5s infinite;
}

@keyframes ytLoading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}