/* Sentinel CSS - Clean and Simple */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --dark-light: #334155;
    --light: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-light: #64748b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
}

.tagline {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: var(--light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.code-editor {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-light);
}

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

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

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--dark-light);
}

.sidebar-header h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.user-info {
    font-size: 13px;
    color: var(--text-light);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    background: var(--dark-light);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item .icon {
    font-size: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--dark-light);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

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

.content-header h1 {
    font-size: 2em;
}

/* Scripts Grid */
#scripts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.script-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.script-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.script-name {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text);
}

.script-language {
    padding: 4px 8px;
    background: var(--light);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
}

.script-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
    min-height: 40px;
}

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

.script-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.5em;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text);
}

.modal form {
    padding: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Output Display */
.output-container {
    background: var(--dark);
    color: #00ff00;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
    margin-top: 20px;
    white-space: pre-wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .main-content {
        padding: 20px;
    }
    
    #scripts-container {
        grid-template-columns: 1fr;
    }
}

/*for the logos.*/
.logosmalltext {
            vertical-align: top;
}

.logosmall { 
    width: 50px;  /* Match height for a perfect circle */
    height: 50px; 
    border-radius: 50%;  /* Makes it circular */
    overflow: hidden;    /* Ensures content (e.g., img) clips to circle */
    position: relative;  /* For animation layering if needed */
}

.logo {
    text-align: center;
    width: 100px;  /* Match height for a perfect circle */
    height: 100px;
    margin-left: 35%;
    border-radius: 50%;  /* Makes it circular */
    overflow: hidden;    /* Ensures content (e.g., img) clips to circle */
    position: relative;  /* For animation layering if needed */
}

/* Assume your logo is an <img> inside .logo; style it to fill the circle */
.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Scales image to fill circle without distortion */
    display: block;
}

/* Simple pulse animation: Gently scales up/down forever */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);  /* Slight enlargement for "pulse" effect */
    }
    100% {
        transform: scale(1);
    }
}

.logo {
    animation: pulse 2s ease-in-out infinite;  /* Apply to container; 2s duration, smooth easing, loops forever */
}
